Last active
August 6, 2017 10:58
-
-
Save n8kowald/13efec1a657b9f6d0db0142b422ae2fa to your computer and use it in GitHub Desktop.
Bash shell script helpers
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
# Choose from an array of strings | |
echo "Please choose the environment" | |
local envs=('staging' 'pre-live' 'live') | |
select env in "${envs[@]}" | |
do | |
case $env in | |
"staging") break;; | |
"pre-live") break;; | |
"live") break;; | |
"Quit") break;; | |
*) echo invalid option;; | |
esac | |
done | |
echo "You chose: $env" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment