/ Published in: Bash
Expand |
Embed | Plain Text
if [ "$QUESTION" = "" ]; then echo -n "Do you want to do this? (y/n)?"; read QUESTION if [ "$QUESTION" = "" ]; then echo "RETRY: NOTHING ENTERED" test.sh exit fi if [ "$QUESTION" = "y" ]; then echo "You want to do this" fi if [ "$QUESTION" = "n" ]; then echo "You don't want to do this" fi fi
You need to login to post a comment.
