[vox-tech] shell question: globbing and command arguments

vox-tech@lists.lugod.org vox-tech@lists.lugod.org
Mon, 3 Nov 2003 08:37:58 -0800


i've always wondered about this...

if i have a bunch of files on a remote host beginning with "backup", i
can copy them to the local host using:

   scp p@remote.host:backup* .

and it works.  but why?  doesn't the shell get to "*" first?  i'd
understand this working:

   scp 'p@remote.host:backup*' .

but why does scp see the asterisk in the unquoted version?

pete

-- 
GPG Instructions: http://www.dirac.org/linux/gpg
GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D