Wednesday, 19 November 2014

OSA: Display O.S. name,login name,host-name

while(true)
do

echo " MENU
------------------------------------------------------------------------------
1)Print O.S. name
2)Dispaly login name
3)Display host name
4)Exit
Please enter your choice -> "

read choice
case $choice in

1) echo "OS name -> "
uname
   echo "OS version -> "
cat /proc/version
;;

2) echo "Login name -> "
whoami
;;

3) echo "Host name -> "
hostname
;;

4) echo "program will be terminated "
exit 0
;;

esac
done

No comments:

Post a Comment