$argv[1] $argv[2] $argv[3]
set a = $argv[1]
set b = $argv[2]
set c = $argv[3]
set i = 1
switch($argv[1])
case $a > 0 :
while($i <= $a)
mv $b.$i.iff $c.$i.iff
@ i ++
end
breaksw
default :
while($i <= ?)
mv $a.$i.iff $b.$i.iff
@ i ++
end
breaksw
endsw
# ls test.1.iff test.2.iff test.3.iff test.4.iff test.5.iff # csh kadai1.sh test tmp argv: Subscript out of range. # ls test.1.iff test.2.iff test.3.iff test.4.iff test.5.iff
# ls xyz.1.iff xyz.2.iff xyz.3.iff xyz.4.iff xyz.5.iff # csh kadai1.sh 3 test tmp 3: Command not found. # ls abc.1.iff abc.2.iff abc.3.iff xyz.4.iff xyz.5.iff