This script will not work.
Try this:

#! /bin/csh -f

set i = 1081

while ( $i <=1440 )
 set n = `echo $i | awk '{print $i-720}'`
echo mv CD267A_3_pk_1_$i.img CD267A_3_pk_1_$n.img
  @ i++
end

Thanks
Abhinav

j...@ssrl, SLAC
Phone: (650) 926-2992
Fax: (650) 926-3292








On Dec 9, 2010, at 5:51 PM, wu donghui wrote:

Dear all,

I need a script to renumber my image. My initial image number ranges from 
*_1081.img to *_1440.img. There are 360 images in total. I want to renumber 
these images with the ranges from *_361.img to *_720.img, that means every 
initial image-720, but I don't know how to do it. Below is my script draft.



#! /bin/csh -f

@ i = 1081

while ( $i >= 1081 )
while ($i <= 1440 )
echo mv CD267A_3_pk_1_$i.img CD267A_3_pk_1_$i-720.img
  @ i++
end

exit



Can anyone help me for this script? Thank you very much.


Best regards,

Donghui

Reply via email to