Ensel Sharon <[EMAIL PROTECTED]> wrote:

> 
> (FreeBSD 6.0-RELEASE)
> 
> I cannot move a file, over ssh, with wildcards:
> 
> # ssh [EMAIL PROTECTED] mv /dir/file*.wav /dir2
> ssh: No match.
> 
> Ok, so I quote it:
> 
> # ssh [EMAIL PROTECTED] mv "/dir/file*.wav" /dir2
> Password:
> mv: rename /dir/file*.wav to /dir2/*.wav: No such file or directory
> 
> I even tried single quoting both paths, and just double quoting the
> file*.wav
> 
> Nothing works.
> 
> Is it possible to move with wildcards over ssh ?

It's definately possible.  Others have provided suggestions -- I've had
success quoting the entire command:

ssh [EMAIL PROTECTED] "mv /dir/file*.wav /dir2"

ssh is odd, because you first have the local shell trying to interpret
the metacharacters, then you have the remote shell trying to do it.
I've had cases where I had to double escape things, for example:

ssh [EMAIL PROTECTED] "echo \"cp * /backup\" >> log.txt"

I wrote a whole remote control framework for a client once, and I believe
I had 4 \ at one point in the script.

-- 
Bill Moran

That's why I never kiss 'em on the mouth.

        Jayne Cobb

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to