i have the following script.. but i cant get the quit command working...
can some1 help
quit = n
host="$(hostnam e)"
todaysdate="$(d ate)"
lastboot="$(las t reboot)"
licensinginfo=" $(uname -a)"
currenthardware info="$(info)"
diskspace="$(df )"
IPAddress="$(/sbin/ifconfig)"
while [ "$quit" = "n" ]
do
clear
echo "1. General machine information"
echo "2. Machine hardware/software information"
echo "3. Network related information"
echo "4. User related information"
echo "Q. Quit"
echo "Please make your selection"
read menunumber
if [ $menunumber -eq 1 ]
then
echo " The hostname is $host"
echo " The date is $todaysdate"
echo " The system last rebooted is $lastboot"
echo " Licensing info:$licensing info"
echo " Press Enter Key to continue"
read ;
else if [ $menunumber -eq 2 ]
then
echo " Current Hardware: $currenthardwar einfo"
echo " Disk space: $diskspace"
echo " Press Enter Key to continue"
read ;
else if [ $menunumber -eq 3 ]
then
echo "IP Address: $IPAddress"
echo " Press Enter Key to continue"
read ;
else if Q|q) quit=y;
*) echo "Invalid Choice"
fi
fi
fi
sleep 1
done
can some1 help
quit = n
host="$(hostnam e)"
todaysdate="$(d ate)"
lastboot="$(las t reboot)"
licensinginfo=" $(uname -a)"
currenthardware info="$(info)"
diskspace="$(df )"
IPAddress="$(/sbin/ifconfig)"
while [ "$quit" = "n" ]
do
clear
echo "1. General machine information"
echo "2. Machine hardware/software information"
echo "3. Network related information"
echo "4. User related information"
echo "Q. Quit"
echo "Please make your selection"
read menunumber
if [ $menunumber -eq 1 ]
then
echo " The hostname is $host"
echo " The date is $todaysdate"
echo " The system last rebooted is $lastboot"
echo " Licensing info:$licensing info"
echo " Press Enter Key to continue"
read ;
else if [ $menunumber -eq 2 ]
then
echo " Current Hardware: $currenthardwar einfo"
echo " Disk space: $diskspace"
echo " Press Enter Key to continue"
read ;
else if [ $menunumber -eq 3 ]
then
echo "IP Address: $IPAddress"
echo " Press Enter Key to continue"
read ;
else if Q|q) quit=y;
*) echo "Invalid Choice"
fi
fi
fi
sleep 1
done
Comment