Forum Moderators: bakedjake
function scpme()
{
scp $1 me@${SSH_CLIENT% * *}:./$2
}
However, when I specify a wildcard like
scpme *.pdf
the *.pdf gets expanded out into the first .pdf file name in the directory, e.g. aaaa.pdf.
When I do
scp *.pdf me@x.x.x.x:./
it does copy over all of the files.
I tried escaping the *, enclosing *.pdf in quotes, etc. but no luck. Searching for the answer proved fruitless.
Basically all I need to know is how to get bash to not expand the input to the funciton out and pass it to scp as *.pdf. Any ideas?