Created
July 2, 2023 05:58
-
-
Save Weiyuan-Lane/60ea0d76196438cb3abb3572b29f3b8d to your computer and use it in GitHub Desktop.
V1 prompt script for testing
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/sh | |
promptGCPEntry(){ | |
while true; do | |
read -p "Please input your Google Cloud Platform Project ID: " gcpProjectId | |
case $gcpProjectId in | |
"") echo "Please input a valid value.";; | |
* ) break;; | |
esac | |
done | |
echo "You inputted GCP Project ID as \"$gcpProjectId\"\n" | |
} | |
promptGCPEntry | |
# Pretend this this doing something productive | |
echo "Running some commands for \"$gcpProjectId\"\n" | |
sleep 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment