topical media & game development

talk show tell print

basic-shell-03-until.sh / sh



  command="init"    # Initialization.
  
  until [ "command" = "exit" ]
  do
      
      echo -n "Enter command or \"exit\" to quit: "
      read command
      echo
          
      case command in
      ls)
          echo "Command is ls."
      ;;
      who)
          echo "Command is who."
      ;;
      *) 
          if [ command != "exit" ] 
          then
              echo "Why did you enter command?"
          fi
      ;;
      esac
  
  done
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.