InverniE
InverniE

Reputation: 598

Cygwin scp command read as incomplete

I am trying to copy a file from a remote server to my local Windows machine using Cygwin. Here the command I am using:

userMe$ scp [email protected]:~/Desktop/O'Bryan/file.csv  ~/

On enter, the system returns a pipe:

userMe$ scp [email protected]:~/Desktop/O'Bryan/file.csv  ~/
>

What is happening?

Upvotes: 1

Views: 414

Answers (2)

CoreyJJohnson
CoreyJJohnson

Reputation: 126

Your shell is interpreting the quote '. You need to escape it with double quotes "'", or a slash \'. I recommend attempting to avoid the use of ' in file names.

 scp [email protected]:~/Desktop/O\'Bryan/file.csv  ~/

or

 scp [email protected]:~"/Desktop/O'Bryan/file.csv"  ~/

or

 scp [email protected]:~/Desktop/O"'"Bryan/file.csv  ~/

More info: http://www.grymoire.com/Unix/Quote.html Read everything at the grymoire site. It may be old, but it is great info and written in an engaging way.

Upvotes: 1

varro
varro

Reputation: 2482

The apostrophe in "O'Bryan" opened a string and the command is waiting for the closing quote. You can escape it (\') to avoid this from happening.

Upvotes: 2

Related Questions