Posted By

masterdam79 on 11/05/09


Tagged

ssh if else


Versions (?)

bash question


 / Published in: Bash
 

  1. if [ "$QUESTION" = "" ]; then
  2. echo -n "Do you want to do this? (y/n)?";
  3. read QUESTION
  4. if [ "$QUESTION" = "" ]; then
  5. echo "RETRY: NOTHING ENTERED"
  6. test.sh
  7. exit
  8. fi
  9. if [ "$QUESTION" = "y" ]; then
  10. echo "You want to do this"
  11. fi
  12. if [ "$QUESTION" = "n" ]; then
  13. echo "You don't want to do this"
  14. fi
  15. fi

Report this snippet  

You need to login to post a comment.