On Mon, Dec 09, 2002 at 11:33:03PM -0800, Osamu Aoki wrote: > Simplest alternative without sub-shell nor special command: > > for i in *.JPG > do > mv $i ${i%\.JPG}.jpg > done > > It works with any reasonable shell ash/bash/dash/... and uses only mv > command.
I like the various clever shell expansions. You don't need the backslash though (so just ${i%.JPG}) - the pattern is just a shell wildcard, not a regular expression. -- Colin Watson [[EMAIL PROTECTED]] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]