Thank You jim, but the output is still exactly the same as w -s on my system. I cant figure out why...
Basically what I'm trying to do is first read the logged on users using the 'users' command, save it in a varible and then running a while loop to get the processes according to the logged on users.
i.e.
#!bin/bash
or something like
Code:
while read $(users)
do
w $user
done
but its giving me an 'invalid identifier' error
should i be using 'case' for this.