-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.sh
executable file
·42 lines (40 loc) · 917 Bytes
/
menu.sh
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
39
40
41
42
#!/bin/bash
MYDATE=`date +%d/%m/%Y`;
HOST=`hostname -s`;
USER=`whoami`
#loop forever
while :
do
clear
cat <<endl
-------------------------------------------------------------------------------------
User: $USER Host:$HOST Date:$MYDATE
-------------------------------------------------------------------------------------
1 : List files in current directory
2 : Use the vi editor
3 : See who is on the system
H : Help screen
Q : Exit Menu
-------------------------------------------------------------------------------------
endl
echo -e -n "Your Choice [1,2,3,H,Q] >"
read CHOICE
case $CHOICE in
1) ls
;;
2) vi
;;
3) who
;;
h|H) cat <<endl
This is the help screen, nothing here yet to help you!
endl
;;
q|Q) exit 0
;;
*) echo -e "\t\007invalid input"
;;
esac
echo -e -n "Hit the return key to continue"
read DUMMY
done