Guest User

Untitled

a guest
Jun 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. read -n1 -p "Do that? [y,n] " doit
  4. case $doit in
  5. y|Y) echo yes ;;
  6. n|N) echo no ;;
  7. *) echo dont know ;;
  8. esac
  9.  
  10.  
  11. echo "Do that? [Y,n] "
  12. read input
  13. if [[ $input == "Y" || $input == "y" ]]; then
  14. echo "do that"
  15. else
  16. echo "don't do that"
  17. fi
Add Comment
Please, Sign In to add comment