next up previous contents
Next: The for command Up: C Shell Programming Previous: The case command   Contents

The while command

The sh program:-

while [ "$1" != "" ]
do
  echo $1
  shift
done

becomes the csh program:-

while ( "$1" != "" )
  echo $1
  shift
end



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