next up previous contents
Next: The break and continue Up: C Shell Programming Previous: The while command   Contents

The for command

The sh program:-

for var
do
  echo $var
done

becomes the csh program:-

foreach var ( $* )
  echo $var
end



P.D. Gronbech (IT Staff) 2015-10-02