9.9.3 for and foreach
command list
end
The equivalent C shell script to copy all files ending in .old to .new is:
#!/bin/csh -f
foreach file (*.old)
set newf = `basename $file .old`
cp $file $newf.new