Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. echo "Assistance of installations for devs"
  3.  
  4. PS3='Please enter your choice: '
  5. options=("Option 1" "Option 2" "Option 3" "Quit")
  6. select opt in "${options[@]}"
  7. do
  8. case $opt in
  9. "Option 1")
  10. echo "you chose choice 1"
  11. ;;
  12. "Option 2")
  13. echo "you chose choice 2"
  14. ;;
  15. "Option 3")
  16. echo "you chose choice $REPLY which is $opt"
  17. ;;
  18. "Quit")
  19. break
  20. ;;
  21. *) echo "invalid option $REPLY";;
  22. esac
  23. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement