On Wed, Apr 11, 2007 at 10:55:29PM +0200, Simon Effenberg wrote:
> On Wed, Apr 11, 2007 at 04:17:38PM -0400, Nick ! wrote:
> > On 4/11/07, Dan Farrell <[EMAIL PROTECTED]> wrote:
> > >
> > >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> > >> Of Karel Kulhavy
> > >> Sent: Wednesday, April 11, 2007 3:47 PM
> > >> To: OpenBSD
> > >> Subject: scp problem with remote filename escaping
> > >> Sounds like a bug to me - the escaping for the remote shell is not being
> > >> done
> > >> correctly?
> > >
> > >Wow.
> > >
> > >Seriously, I think the real 'bug' is your file naming conventions.
> > >
> > >Who would anyone specifically want to name a file with a space in it...
> > >and if breaks on scp, where else will that screwy naming convention
> > >break as well?
> > >
> > >I'm sure you'll give some really good reason why the files have to be
> > >named that way...
> > 
> > I agree, spaces in filenames should be avoided. But spaces in
> > filenames are legal, so programs need to support that; this seems like
> > a case scp was never tested against because no one uses files with
> > those names.
> > 
> > -Nick
> > 
> 
> scp needs 3 * \ for one space..

scp needs one (1) \ for one space in case of remote file and zero (0) \ in case
of local one. The extra \'s are for bash but bash is irrelevant in this case.
It's just one possible method of calling the process. Another method is
writing a small C program and using exec.

CL<
> 
> scp [EMAIL PROTECTED]:/what/you/want/a\\\ b.txt    localfile.txt
> 
> \s
> 
> -- 
> GnuPG: 5755FB64
> 
> Per aspera ad astra.

Reply via email to