scp question

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: der.hans
Date:  
Subject: scp question
Am 11. Sep, 2003 schw=E4tzte Kurt Granroth so:

> This problem is due to the interaction with the shell. When you specify =

a
> wildcard on the command line, the shell will try to expand it out BEFORE
> sending it to the command. So you may be intending the '*' to be passed =

to
> scp as-is.. but it's not, it's expanded out (to nothing in your case) fir=

st.

That is true in most cases, but if it encounters a colon it won't expand th=
e
glob as it presumes that's for the remote machine.

$ scp 10.1.1.100:*png .
PLUG_logo.png                                 100% 5629   174.7KB/s   00:00
feder.png                                     100%  149KB 858.4KB/s   00:00
openlogo-nd-100.png                           100% 1597   349.2KB/s   00:00
openlogo-nd-50.png                            100%  759    80.0KB/s   00:00
openlogo-nd-75.png                            100% 1165   272.3KB/s   00:00


There's probably a stronger definition such as "<string>:" or
"<hostname|ip>:". I don't know if this is only for ssh and rsh. It's not du=
e
to command completion. It might be bash only, but I'm pretty sure it works
on ksh on AIX as well.

ciao,

der.hans
--=20
#  https://www.LuftHans.com/    http://www.AZOTO.org/
#  The only way for a woman to change a man
#  is if he's wearing Depends[TM] - der.hans