Hello! On Sat, Jun 16, 2007 at 04:17:42PM -0700, Clint Pachl 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 You mean $ cp test{,.bak} See "Brace expansion" in the ksh(1) manual page. (Note, it's not in sh(1)! After testing I see brace expansion is not described in the sh manual page, but if I invoke sh and type echo a{,b}, the result is still the same as in ksh). Kind regards, Hannah.