Skip to content

Instantly share code, notes, and snippets.

@Tyderion
Last active December 17, 2015 19:39
Show Gist options
  • Save Tyderion/5661629 to your computer and use it in GitHub Desktop.
Save Tyderion/5661629 to your computer and use it in GitHub Desktop.
Bash: Yes/No Case
case $yno in
[yY] | [yY][Ee][Ss] )
echo "Agreed"
;;
[nN] | [n|N][O|o] )
echo "Not agreed, you can't proceed the installation";
exit 1
;;
*) echo "Invalid input"
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment