File: menu

package info (click to toggle)
splitvt 1.6.6-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,004 kB
  • sloc: ansic: 4,953; sh: 99; perl: 15; makefile: 10
file content (38 lines) | stat: -rwxr-xr-x 834 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
#
#	An example menu utilizing the SPLITVT environment variable.
#

if [ "$SPLITVT" = "upper" ]; then
	echo "This is the upper window MENU:"
	echo ""
	echo "1)	apples"
	echo "2)	oranges"
	echo "3)	bananas"
	echo ""
	printf "Enter your fruit of choice: "
	read fruit
	case $fruit in
		1)	echo "You like apples!";;
		2)	echo "You like oranges!";;
		3)	echo "You like bananas!";;
		*) echo "What fruit was that?";;
	esac
elif [ "$SPLITVT" = "lower" ]; then
	echo "This is the lower window MENU:"
	echo ""
	echo "1)	pickles"
	echo "2)	carrots"
	echo "3)	cabbage"
	echo ""
	printf "Enter your vegetable of choice: "
	read fruit
	case $fruit in
		1)	echo "You like pickles!";;
		2)	echo "You like carrots!";;
		3)	echo "You like cabbage!";;
		*) echo "What vegetable was that?";;
	esac
else
	echo "You are not running splitvt!"
fi