On Tuesday 15 July 2003 09:25 pm, Todd Slater wrote: > On Tue, 15 Jul 2003 20:35:15 -0500 > > Chris <[EMAIL PROTECTED]> wrote: > > At one time a long ways back someone posted, I think it was a small > > script file to change the case of file extensions, ie..MP3 to .mp3. > > Does anyone have that laying around? I've been googling and found a > > few, but none seem to work correctly. > > > > Thanks > > Chris > > Or, to change *all* extensions to lowercase: > (assuming you are in the directory you want to do this) > > #/bin/bash > for i in * > do > name=`echo $i|cut -d '.' -f 1` > ext=".`echo $i|cut -d '.' -f 2|tr [A-Z] [a-z]`" > echo "$i : $name$ext" > # mv "$i" "$name$ext" > done > > Assuming that your filenames don't have '.' in the name other than to > denote extension. > > Todd
Thanks Todd, this looks more like what I want, have a slight problem though as shown below with the output: usr/local/bin/chgcase: line 4: Â : command not found /usr/local/bin/chgcase: line 5: Â : command not found /usr/local/bin/chgcase: line 6: Â : command not found [EMAIL PROTECTED] ACDC - High Voltage]$ Made it executable, made a symbolic link from /home/chris to /usr/local/bin. When run chgcase *.MP3 *.mp3 the output is as above. I'm sure I've used this script before but I don't remembe how. Thanks Chris -- Regards Chris A 100% Microsoft free computer Registered Linux User 283774 http://counter.li.org 9:49pm up 24 days, 4:03, 6 users, load average: 2.44, 2.13, 1.64
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com