第 7 回 shellスクリプト入門 ... OS操作の高度化(??)

教科書pp181-195


#!/bin/sh
while [ 0 ]
do
  echo TDU
done

#!/bin/sh
i=1
while [ $i -le 10 ]
do
  echo TDU
  i=`expr $i + 1`
done

#!/bin/sh
if [ $1 ]
then
  echo You are $1
else
  echo Who are you?
fi

#!/bin/sh
case $1 in
  g) echo aiko;;
  c) echo meketa;;
  p) echo katta;;
  *) echo dame!;;
esac