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
Code:
var=$(users);