The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 05-13-2008
kartikkumar84@g kartikkumar84@g is offline
Registered User
 

Join Date: May 2008
Posts: 16
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);
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.

Last edited by kartikkumar84@g; 05-13-2008 at 03:40 PM. Reason: solution found partly
Reply With Quote