Sponsored Content
Full Discussion: ps help
Top Forums UNIX for Dummies Questions & Answers ps help Post 302071347 by beginner1 on Saturday 15th of April 2006 03:14:27 PM
Old 04-15-2006
Ok figured out most of it. I am stuck on the following part.
How do i retrieve a user name from the finger command and assign it to a variable. I would like to loop through each user name.

I have used the following so far:


finger | cut -d" " -f 1 > File1

This gives me output such as:
John.Doe
Jane.Doe
Tom.Fictional

How do I get the name assigned to a variable, then cycle on to the next name?

Last edited by beginner1; 04-15-2006 at 05:32 PM..
 
rusers(1)						      General Commands Manual							 rusers(1)

NAME
rusers - Display a list of users who are logged in to a remote machine SYNOPSIS
rusers [-ahilu] host... OPTIONS
Give a report for a machine even if no users are logged in. Sort alphabetically by host name. Sort by idle time. Give a longer listing in the style of who(1). Sort by number of users. DESCRIPTION
The rusers command displays information about users and processes running on remote machines. The listing is in the order in which responses are received, but this order can be changed by specifying one of the options listed in the OPTIONS section. By default the rusers command prints the names of the users logged in. When the -l option is given, additional information is printed for each user, as follows: userid hostname:terminal login date login time idle time login host If hostname and login host are the same value, the login host field is not displayed. Likewise, if hostname is not idle, the idle time is not displayed. A remote host only responds if it is running the rusersd daemon, which may be started from the inetd daemon or the listen function. SEE ALSO
Commands: who(1), inetd(8) Functions: listen(2) rusers(1)
All times are GMT -4. The time now is 09:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy