#!/bin/csh -f

set prg = addDot
set ver	= "Version 1.0"

if($#argv != 5) then
        echo
        echo "$prg - $ver"
        echo "(c) 1994 The Ray Rebels"
        echo
        echo "Usage: $prg <Sequence> <Start> <End> <Step> <Extension>"
        echo
        echo "This C-Shell add dot to a sequence in the File1.ext format"         
        echo "Example: file1.pic will become file.1.pic"         
        echo
        echo
        exit 1
endif


set sequence = $1
set start = $2
set end = $3
set step = $4
set extension = $5


while ($start <= $end)
	cp ${sequence}$start.$extension ${sequence}.$start.$extension
	echo "Moving ${sequence}$start.$extension in ${sequence}.$start.$extension"
	@ start += $step
end


