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

Comments

Popular posts from this blog

NASM: program to find largest number from an array of 32-bit numbers(hard-coded)

Rules for drawing a FLOWCHART