Bash - Yes/No

#!/bin/bash read -p "Please, Say Yes? y/n " -n 1 -r; echo # newline; if [[ $REPLY =~ ^[Yy]$ ]] then echo "You Said Yes!" exit 0 else echo "Not Yes???!" exit 1 fi

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.