Created
August 16, 2021 11:53
-
-
Save dev01d/8d47395d727cdb7d45e0769a54fc5c0e to your computer and use it in GitHub Desktop.
y/n
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
read -p "Question (y/N)? " answer | |
case ${answer:-n} in | |
y|Y ) | |
echo Yes | |
;; | |
n|* ) | |
echo No | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment