Created
August 19, 2019 16:50
-
-
Save dasDaniel/89e487d9990f01c65fb45d2788d50c57 to your computer and use it in GitHub Desktop.
prompt for yes
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
#!/bin/bash | |
echo -n "Continue (y/n)? " | |
read answer | |
if [ "$answer" != "${answer#[Yy]}" ] ;then | |
echo Yes | |
install_thing | |
else | |
echo No | |
exit | |
fi |
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
#!/bin/bash | |
echo -n "Must be yes or Yes (yes)? " | |
read answer | |
if [ "$answer" != "${answer#[Yy]es}" ] ;then | |
echo Yes | |
install_thing | |
else | |
echo No | |
exit | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment