[Gllug] error in bash script to rename files in a directory

Liam Delahunty ldelahunty at britstream.com
Fri Dec 27 22:34:45 UTC 2002


Hi Chaps,

I tried the following "script" in a shell...

for i in `ls *.php3`; do mv $i `echo $i|tr 'php3' 'php'`; done

with the intention of renaming all the files in a folder from .php3 to .php

Instead, I now have *.phpp

Could some kind soul explain what should I have done (and what fundamental
concept I've got wrong...)

Kind regards,
Liam Delahunty
http://www.corx.co.uk | http://www.moderngent.com




-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list