Created
November 25, 2019 13:20
-
-
Save dave-burke/e53c66bfdad44b600dacc7e816216bbf to your computer and use it in GitHub Desktop.
An example of how to make sure the user is *really* sure before you do something.
This file contains hidden or 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 | |
read -p "Are you sure? " sure | |
while [[ "${sure}" != "yes" && "${sure}" != "no" ]]; do | |
read -p "Please type 'yes' or 'no' " sure | |
done | |
echo "${sure}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment