Skip to content

Instantly share code, notes, and snippets.

@Weiyuan-Lane
Created July 2, 2023 05:58
Show Gist options
  • Save Weiyuan-Lane/60ea0d76196438cb3abb3572b29f3b8d to your computer and use it in GitHub Desktop.
Save Weiyuan-Lane/60ea0d76196438cb3abb3572b29f3b8d to your computer and use it in GitHub Desktop.
V1 prompt script for testing
#!/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