Re: UPPER to lowercase.

2000-04-02 Thread Hans
Thanks guys. I indeed got the quotes wrong and also the space in between the two arguments. This worked fine: for x in *; do mv $x `echo $x | tr [A-Z] [a-z]`; done Another lesson learnt: watch `em quotes. Using mmv is fine, but my purpose is to learn some plain shell scripting. I'm slowly working

Re: UPPER to lowercase.

2000-04-02 Thread Colin Watson
Hans <[EMAIL PROTECTED]> wrote: >I'm trying to get this bash script working which converts filenames from >UPPER to lowercase. > >for x in *; do mv $x 'echo $x|tr [A-Z][a-z]'; done; > >It comes back with 'when moving multiple files, last argument must be a >directory.' I thought this was a loop, s

Re: UPPER to lowercase.

2000-04-02 Thread John Hasler
Hans writes: > for x in *; do mv $x 'echo $x|tr [A-Z][a-z]'; done; > ... > Any ideas how to get this working? Use the right kind of single quotes and seperate the arguments to tr with a space. -- John Hasler [EMAIL PROTECTED] (John Hasler) Dancing Horse Hill Elmwood, WI

Re: UPPER to lowercase.

2000-04-02 Thread Ethan Benson
On Sun, Apr 02, 2000 at 05:13:33PM +0200, Hans wrote: > I'm trying to get this bash script working which converts filenames from > UPPER to lowercase. > > for x in *; do mv $x 'echo $x|tr [A-Z][a-z]'; done; wrong kind of quotes: #! /bin/sh for x in * do mv $x `echo $x | tr 'A-Z' 'a-z'`

Re: UPPER to lowercase.

2000-04-02 Thread Brendan Cully
On Sunday, 02 April 2000 at 17:13, Hans wrote: > I'm trying to get this bash script working which converts filenames from > UPPER to lowercase. > > for x in *; do mv $x 'echo $x|tr [A-Z][a-z]'; done; > > It comes back with 'when moving multiple files, last argument must be a > directory.' I thou

Re: UPPER to lowercase.

2000-04-02 Thread J.H.M. Dassen \(Ray\)
On Sun, Apr 02, 2000 at 17:13:33 +0200, Hans wrote: > for x in *; do mv $x 'echo $x|tr [A-Z][a-z]'; done; Use for x in *; do mv $x `echo $x | tr '[A-Z][a-z]'`; done Note the backticks and the quoting of the square brackets (to prevent them from being interpreted by the shell as globbing p