All pastes #248466 Raw Edit

##linux words

public text v1 · immutable
#248466 ·published 2006-11-14 18:27 UTC
rendered paste body
while [ "a" != "0" ] 
do
read answer
 if "$answer" -eq "y" || "$answer" -eq "n"
   then
   if "$answer" -eq "y"
     then
     echo "Now checking that everything is right...."
     a=$(a-1)
   else
     echo "That's your problem..."
     exit 
   fi
 else 
 echo "Answer should be 'y' or 'n'"
 fi
done


while : ; do 

   read a  
   case "$a" in
     [Yy]) cmd1 ;;
     [Nn]) cmd2 ;;
     *) cmd4 ;;
  esac

done: