1
0
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:
moshix 2017-12-29 00:08:32 -06:00 committed by GitHub
parent 09251d1086
commit 11126e4302
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

22
menu.bash Normal file
View 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