set i = 1
while($i <= $argv[1])
mv $argv[2].$i $argv[3].$i
@ i ++
end
# ls test.1.iff test.2.iff test.3.iff test.4.iff test.5.iff # csh kadai1.sh test tmp while: Expression Syntax. # 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 mv: xyz.1: No such file or directory mv: xyz.2: No such file or directory mv: xyz.3: No such file or directory # ls xyz.1.iff xyz.2.iff xyz.3.iff xyz.4.iff xyz.5.iff