you can use awk command to format the output from who
for eg,
who | awk '{ printf "%s\n",$1}'
use man for more info about awk
use for loop to iterate thru the entries
"Felix T. Gomez, Jr." <[EMAIL PROTECTED]> wrote:
Hi,
Thanks for the reply. I am satisfied with the who
command. Let me put it to the higher level.
I hope somebody can guide me as to how can I get the
information from WHO command then put it in my
database?
Can anybody give me pieces here, pieces there so that
I can form a program for that purpose?
--- Varghees Samraj <[EMAIL PROTECTED]> wrote:
> finger
> w
> who
>
> you can also use log file /var/log/messages
>
> "Felix T. Gomez, Jr." <[EMAIL PROTECTED]>
> wrote: Hi,
>
> I have a network where students log in to a server
> and
> use the internet in the "dumb terminal". I want a
> script to get the number of hours for a particular
> user so that I can record how many hours he spent
> using the internet.
>
> I remember that there is a command to see the
> current
> users but I can not remember the exact command.
>
> Somebody shed light on this matter. Thank you very
> much.
>
>
>
__________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile. Try it now.
>
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
>
>
>
>
>
> ---------------------------------
> Be a better friend, newshound, and know-it-all with
> Yahoo! Mobile. Try it now.
>
> [Non-text portions of this message have been
> removed]
>
>
__________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
[Non-text portions of this message have been removed]
To unsubscribe from this list, please email [EMAIL PROTECTED] & you will be
removed.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/LINUX_Newbies/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/LINUX_Newbies/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/