Help with bash command to change lots of file names

greadey readey at
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


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


More information about the Ukfreebsd mailing list