Help with bash command to change lots of file names

greadey readey at greadey.uklinux.net
Fri May 17 01:47:50 BST 2002


Thanks for everyones' replies.  I did actually sort it out with perl as;

for f in * ; do

$NEW=`echo $f | perl -pe 's/chap([1-9]+)/ch$1/i'`

mv $f $NEW

done

Why I never tried it with perl first I'll never know :-)

greadey.





More information about the Ukfreebsd mailing list