In /sh/bash/ksh/zsh something like for f in XXX_10[0-9][0-9][0-9].img do mv -vi $f XXX_${f#XXX_10} done
Cheers Clemens PS: no guarantee ... On Thu, Aug 07, 2008 at 01:40:44AM -0700, yanming Zhang wrote: > All UNIX gurus, > > I need to change 300 image file names sequentially, such as: > XXX_10001.img to XXX_101.img > XXX_10002.img to XXX_102.img > ................ > > Obviously, using UNIX 'mv' to work on 300 files is stupid. Anyone can give me > a very simple UNIX shell file to finish the job quickly? Thank you! > > Yanming > > > > -- *************************************************************** * Clemens Vonrhein, Ph.D. vonrhein AT GlobalPhasing DOT com * * Global Phasing Ltd. * Sheraton House, Castle Park * Cambridge CB3 0AX, UK *-------------------------------------------------------------- * BUSTER Development Group (http://www.globalphasing.com) ***************************************************************