[ale] mv *.JPG *.jpg

Bradley Leonard bradley at stygianresearch.com
Tue Dec 17 16:43:09 EST 2002


Quoting Christopher Bergeron <christopher at bergeron.com>:
>
> Does anyone know how I can do this:
> 
> mv *.JPG *.jpg ???
> 
> I can do it in DOS; but I haven't been able to figure out how to do it 
> in linux yet.  Anyone have any suggestions?
> 
> Thanks,
> CB

for f in `ls *.JPG`
do
  NF=`echo ${f} | sed -e 's/JPG$/jpg/'`
  mv ${f} ${NF}
done

That should take care it.

-- 
Bradley Leonard 
bradley at stygianresearch.com 
http://stygianresearch.com/~bradley 
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list