Re: [ccp4bb] Change reflection file names

2008-08-07 Thread William G. Scott
Hi Yanming: Using zsh shell, this is very easy. I have the following pre-defined in ~/.zshrc autoload -U zmv alias mmv='noglob zmv -W' so all I have to do is type mmv foo_10[0-9][0-9].img foo_1[0-9][0-9].img mmv foo_11[0-9][0-9].img foo_2[0-9][0-9].img mmv foo_12[0-9][0-9].img foo_3[0-9][0-9]

Re: [ccp4bb] Change reflection file names

2008-08-07 Thread Juergen Bosch
Is your "problem" Mosflm related ? Then you could have used the command Template XXX_.img Jürgen On 7 Aug 2008, at 01:40, 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 ...

Re: [ccp4bb] Change reflection file names

2008-08-07 Thread Jan Abendroth
try the unix tool mmv. jan On Aug 7, 2008, at 1:40 AM, 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

Re: [ccp4bb] Change reflection file names

2008-08-07 Thread Andersen, Ole
lto:[EMAIL PROTECTED] On Behalf Of yanming Zhang Sent: 07 August 2008 09:41 To: CCP4BB@JISCMAIL.AC.UK Subject: [ccp4bb] Change reflection file names 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

Re: [ccp4bb] Change reflection file names

2008-08-07 Thread Ian Tickle
Hi Yanming You don't even need a shell script, there's a Unix command to do precisely this: 'rename'. Sadly usage does vary between distributions, e.g. Debian & RedHat based distributions differ, so type 'man rename' and follow the instructions! HTH! -- Ian > -Original Message- > From

Re: [ccp4bb] Change reflection file names

2008-08-07 Thread Clemens Vonrhein
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

[ccp4bb] Change reflection file names

2008-08-07 Thread yanming Zhang
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 y