Thursday, June 21, 2018

Write a shell script that finds total no. of users and finds out how many of them are currently logged in. - OS

cat /etc/passwd>user.txt
set `wc -l user.txt`
log=`who|wc -l`
echo "There are $1 users in network "
echo "There are $log user loged in right now"

No comments:

Post a Comment