scp strange behavior

From: Alf (xelahome_at_nospam.free.fr)
Date: 07/30/03


Date: Wed, 30 Jul 2003 09:41:20 +0200

Hello,

I wrote a script which copy files to remote host with scp command. My Goal
is to copy files with space in their name (I know it is bad!!! but users are
using those #!!!# files!) :-(
I don't understand really well the behavior of scp command.

Indeed, in my script the following command dont work and for example for
file "/path/file with space.jpg" I got :
"/path/file with space.jpg" : No such file or directory error.

$REMOTE_COPY "\".$FILE_NAME\""
$REMOTE_USER@$HTTP_HOST:$REMOTE_HTTP_DOC_ROOT$DIR_NAME

However in the same script the following command works!!!
 $REMOTE_COPY "\".$FILE_NAME\"" /tmp

I don't understand why!

Does someone have a clue?

Thank you in advance

Alf



Relevant Pages

  • Re: scp strange behavior
    ... On Wed, 30 Jul 2003 at 07:41 GMT, Alf wrote: ... > I wrote a script which copy files to remote host with scp command. ...
    (comp.unix.shell)
  • Re: scp strange behavior
    ... >I wrote a script which copy files to remote host with scp command. ... Why are you escaping the quotes? ...
    (comp.unix.shell)
  • scripts without passwords
    ... My objective is to run a script containing a scp command that runs ... without a passwords. ... If the scp is not contained within a script it must have a password. ...
    (comp.security.ssh)
  • Re: ssl scp authentication
    ... > Is there a way to script the scp command to include the authentication? ... The usual way to do this is to generate a public/private key pair with ...
    (comp.unix.shell)
  • Re: scp of multiple files to multiple locations on remote host
    ... shell script to multiple locations on a remote host. ... or is not possible with one scp command? ... Something like this untested command: ...
    (comp.unix.shell)