I need to run the who command in a script that will then display a message stating that there are more than 1 users on the system should the results of the who command return more than 1 users logged on.
I know the following does not work but am i on the right lines ? Anyone already run a similar script ?
num=`who`
if [ "$num" -gt "1" ]
then
print "MORE THAN ONE USER ON SYSTEM"
fi
I know the following does not work but am i on the right lines ? Anyone already run a similar script ?
num=`who`
if [ "$num" -gt "1" ]
then
print "MORE THAN ONE USER ON SYSTEM"
fi