mirror of
https://github.com/moshix/mvs.git
synced 2026-01-11 23:43:00 +00:00
new menu bash script
This commit is contained in:
parent
09251d1086
commit
11126e4302
22
menu.bash
Normal file
22
menu.bash
Normal file
@ -0,0 +1,22 @@
|
||||
title="Moshix' Wonderful Ascii World"
|
||||
prompt="Pick an option:"
|
||||
options=("Star Wars" "Acquarium" "Mission Impossible Computer Screen")
|
||||
trap ctrl_c INT
|
||||
function ctrl_c() {
|
||||
echo "** Trapped CTRL-C **"
|
||||
}
|
||||
today=$(date)
|
||||
echo "$today" >> /home/asci/visitor.log
|
||||
echo
|
||||
echo
|
||||
echo "$title"
|
||||
PS3="$prompt "
|
||||
select opt in "${options[@]}" "Quit"; do
|
||||
case "$REPLY" in
|
||||
1 ) /home/asci/starwars/asciimation.awk ./starwars/data/sw1.txt;;
|
||||
2 ) /usr/local/bin/asciiquarium;;
|
||||
3 ) /usr/bin/hollywood;;
|
||||
$(( ${#options[@]}+1 )) ) echo; echo; echo " OK, back to your terminal prompt...Goodbye!"; sleep 2; break;;
|
||||
*) echo "Invalid option. Try another one.";continue;;
|
||||
esac
|
||||
done
|
||||
Loading…
x
Reference in New Issue
Block a user