#!/bin/csh
@ start = $argv[1]
@ end = $argv[2]

if ( $#argv > 2 ) then
  @ step = $argv[3]
else
  @ step = 1
endif 

echo "start=$start end=$end step=$step"

@ iter = $start
while ($iter <= $end)
echo 80 >! scr_anim
while ($iter <= $argv[2])
if ($iter < 10) then 
   echo inter000$iter.cfg.gz Pic/inter000$iter.jpg >> scr_anim
else
   if ($iter < 100) then 
      echo inter00$iter.cfg.gz Pic/inter00$iter.jpg >> scr_anim
   
   else
       if ($iter < 1000) then 
          echo inter0$iter.cfg.gz Pic/inter0$iter.jpg >> scr_anim
       else
          if ($iter < 10000) then 
             echo inter$iter.cfg.gz Pic/inter$iter.jpg >> scr_anim
          endif
       endif
   endif
endif
@ iter = $iter + $step
end
