Hello,
I've created a simple menu that will execute some commands, and display them on the screen. However, when I try to execute them in the menu, nothing appears. I was not sure if I went about this the right way. Any help is appreciated.
trap "rm ./f 2> /dev/null; exit" 0 1 3
projectfile=!/project1
loop=y
while test $loop = "y"
do
clear
tput cup 1 12: echo "Welcome " logname;
tput cup 3 12; echo "Project 1 Sample Menu"
tput cup 4 12; echo "====================="
tput cup 6 9; echo "P - Display List Of Current Users"
tput cup 7 9; echo "C - Display The Current Month's Calender"
tput cup 8 9; echo "L - Display The Last 20 Users In The Password File"
tput cup 10 9; echo "Q - Exit: "
tput cup 12 19;
read choice || continue
case $choice in
[Pp]) echo users ;;
[Cc]) echo cal -y ;;
[Ll]) echo sed -n '1409,1428p' /etc/passwd ;;
[Qq]) clear ; exit ;;
*)tput cup 14 4; echo "Invalid Code"; read choice ;;
esac
done