scp and filenames with weird characters

Gert Doering gert at greenie.muc.de
Fri Dec 29 01:54:59 EST 2000


Hi,

On Thu, Dec 28, 2000 at 01:22:21PM +0100, Markus Friedl wrote:
> > -   "%s%s -x -o'FallBackToRsh no' -n -l %s %s %s %s '%s%s%s:%s'",
> > +   "%s%s -x -o'FallBackToRsh no' -n -l 
> >      \"%s\" \"%s\" \"%s\"\"%s\" '%s%s%s:%s'",
> 
> not every shell uses " for quotes, some use ' only.

For all shells that I've tested so far, " and ' are equivalent in the
context of "quoting is used to preserve blanks in arguments" (sh and
all compatibles, csh, zsh).

The main difference between these is whether variables ("$foo") are
expanded or not.  So single quotes might be a better choice to avoid
surprises with '$' in file names.

gert
-- 
Gert Doering
Mobile communications ... right now writing from *Aichach*
... mobile phone: +49 177 2160221 ... or mail me:  gert at greenie.muc.de





More information about the openssh-unix-dev mailing list