aquaballoon

sh - select; list

Dec 5th, 2011
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.61 KB | None | 0 0
  1. #!/bin/bash
  2. # Set PS3 prompt
  3. PS3="Enter the space shuttle to get quick information : "
  4.  
  5. # set shuttle list
  6. # exit option
  7. select shuttle in columbia endeavour challenger discovery atlantis enterprise pathfinder exit
  8. do
  9.     case $shuttle in
  10.         columbia)
  11.             echo "--------------"
  12.             echo "Space Shuttle Columbia was the first spaceworthy space shuttle in NASA's orbital fleet."
  13.             echo "--------------"
  14.             ;;
  15.         endeavour)
  16.             echo "--------------"      
  17.             echo "Space Shuttle Endeavour is one of three currently operational orbiters in the Space Shuttle."
  18.             echo "--------------"      
  19.             ;;
  20.         challenger)
  21.             echo "--------------"              
  22.             echo "Space Shuttle Challenger was NASA's second Space Shuttle orbiter to be put into service."
  23.             echo "--------------"                  
  24.             ;;     
  25.         discovery)
  26.             echo "--------------"      
  27.             echo "Discovery became the third operational orbiter, and is now the oldest one in service."
  28.             echo "--------------"                          
  29.             ;;     
  30.         atlantis)
  31.             echo "--------------"      
  32.             echo "Atlantis was the fourth operational shuttle built."
  33.             echo "--------------"                          
  34.             ;;
  35.         enterprise)
  36.             echo "--------------"      
  37.             echo "Space Shuttle Enterprise was the first Space Shuttle orbiter."
  38.             echo "--------------"                          
  39.             ;;     
  40.         pathfinder)
  41.             echo "--------------"      
  42.             echo "Space Shuttle Orbiter Pathfinder is a Space Shuttle simulator made of steel and wood."
  43.             echo "--------------"                          
  44.             ;;
  45.                 exit)
  46.                     echo "Bye!"
  47.                         break
  48.                         ;;
  49.         *)     
  50.             echo "Error: Please try again (select 1..8)!"
  51.             ;;     
  52.     esac
  53. done
Advertisement
Add Comment
Please, Sign In to add comment