Program:
clear
echo " 1.contents of /etc/passwd"
echo " 2.no of users logged in"
echo " 3.presently working directory"
echo " 4.exit"
echo " select any of your choice"
read num
case $num in
1)
echo " contents of the file /etc/passwd"
cat /etc/passwd|pg
;;
2)
echo "no of users presently working"
u =` who | wc |cut -c 1-10 `
echo $u
;;
3)
echo "Your presently working directory is "
pwd
;;
4)
exit
Input/OutPut:
1.contents of /etc/passwd
2.no of users logged in
3.presently working directory
4.exit
select any of your choice
No comments:
Post a Comment