[Malvern] Bash script..

Robin Wilson r.t.wilson at rmplc.co.uk
Sat Jun 4 22:33:21 BST 2005


Hi all,

I haven't yet learnt how to write bash scripts - althought it is on my to do 
list. At the moment though, I need to write a bash script that, when given a 
directory as a command line arguement, will:
* Rename all files in that directory from filename.JPG to filename.jpg 
(leaving the filename bit the same, just making the JPG in small letters - 
I'm sure this can be done via RegExps)
* Create a file called 'description' in that directory containing a list of 
all the filenames in that directory then a comma and then the filename 
again... eg:
    filename1.jpg, filename1.jpg
    filename2.jpg, filename2.jpg

Is this possible? and would someone be able to write me a script to do that?

Thanks in advance,

Robin 




More information about the Malvern mailing list