Kaymi
2013-06-03 18:41:53 UTC
1 #!/bin/bash
2 CHOICE=9
3 until [ $CHOICE -eq 6 ]
4 do
5 clear
6 echo Please select an menu item
7 echo
8 echo "1) Display a list of files and directories in the current directory"
9 echo "2) Display a long list of files and directories in the current directory"
10 echo "3) Display the last 10 lines of the log file messages (/var/log/messages)"
11 echo "4) Display the contents of this script"
12 echo "5) Display the contents of this script in reverse order"
13 echo "6) Exit the program"
14 echo
15 read CHOICE
16 case $CHOICE in
17 1) ls;;
18 2) ls-l;;
19 3) tail workgroup3;;
20 4) cat workgroup3;;
21 5) tac workgroup3;;
22 6) echo "Have a great day!";;
23 esac
24 done
25
26