Use OS commands to obtain the following results
while true
do
echo "MENU"
echo "1. name of operating system"
echo "2. login name"
echo "3. host name"
echo "4. current kernel"
echo "5. exit"
echo "enter ur choice"
read ch
case $ch in
1) echo "name of operating system is"
uname -o;
cat /etc/issue;;
2) echo "login name is"
logname;;
3) echo "host name is"
uname -n;;
4) echo "current kernel is"
uname -s;;
5) exit;;
esac
done
- To print the name of the OS
- To print the login name
- To print the host name
- To print the current kernel
while true
do
echo "MENU"
echo "1. name of operating system"
echo "2. login name"
echo "3. host name"
echo "4. current kernel"
echo "5. exit"
echo "enter ur choice"
read ch
case $ch in
1) echo "name of operating system is"
uname -o;
cat /etc/issue;;
2) echo "login name is"
logname;;
3) echo "host name is"
uname -n;;
4) echo "current kernel is"
uname -s;;
5) exit;;
esac
done
Blogger Comment
Facebook Comment