On Sep 11, 2:51pm, Kurt Granroth wrote:
> 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) first.
The way that most shells work is that they attempt to expand the
wildcard, and if that fails, they'll leave the wildcard intact. To see
this, do:
echo foo/*
Assuming that don't have a directory named foo in your current directory,
this'll just print "foo/*".
OTOH, assuming that you have at least on non-hidden file in your current
directory, doing:
echo *
will produce a useful expansion and will show you a list of the files
in your directory. (Which is useful if you find that you don't have a
working "ls".)
I suspect that Mike was sending a path with a '*' in it to the remote
scp program. I think things didn't work as Mike expected due to the
fact that the remote scp doesn't do wildcard expansion.
Kevin