On 17/06/07, Clint Pachl <[EMAIL PROTECTED]> wrote:
The other day on the Internet I found a shell tip that showed how to use
cp or mv with only a single argument. I tried it in the default pdksh in
OBSD and it worked. I thought to myself, I can't believe I have been
using the shell for over 8 years and didn't know that. Now I can't
remember how to do it or where I found the tip. Does anybody know what
I'm talking about? (I'm too lazy to look through source for this)

This obviously isn't correct, but it went something like this:

$ ls
test
$ cp {test,.bak}
$ ls
test    test.bak



This is not actually invoking cp with only one argument.  See here:

$ set -x
$ touch test
+ touch test
$ cp test{,.bak}
+ cp test test.bak

With "set -x", the shell will tell us exactly what gets executed.

Cheers,
Andreas


--
Andreas Kahari
Somewhere in the general Cambridge area, UK

Reply via email to