Return to Snippet

Revision: 10352
at December 21, 2008 20:57 by jaduks


Initial Code
#!/bin/sh

f_Reg () {
echo "Regression function"
echo "All your logic in this function"
}

f_Smoke () {
echo "Smoke function"
echo "All your logic in this function"
}

while : # Loop forever
do
cat << !

R U N M E N U

1. Regression Tests
2. Smoke Tests
3. Quit

!

echo -n " Your choice? : "
read choice

case $choice in
1) f_Reg ;;
2) f_Smoke ;;
3) exit ;;
*) echo "\"$choice\" is not valid "; sleep 2 ;;
esac
done

Initial URL
http://unstableme.blogspot.com/2008/06/bash-script-menu.html

Initial Description
Another way of writing a continuous bash menu.

Initial Title
Another way to write bash menu script

Initial Tags
Bash, script

Initial Language
Bash