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 | |
if [[ "$1" = "" ]]; then | |
echo "Usage:" | |
echo " -a foo|bar Select foo or bar" | |
echo " -v verbose (set -x)" | |
echo " --arg1 One arg" | |
echo "" | |
echo "Example: | |
echo " ./arguments.sh -a foo --arg1" |
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 | |
all_done=0 | |
while (( !all_done )); do | |
options=("do-1" "do-2" "Quit") | |
select opt in "${options[@]}" | |
do | |
case $opt in | |
"do-1") |