![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| printing each users by processes | sam4now | Shell Programming and Scripting | 12 | 04-28-2008 06:11 PM |
| users and there processes | iago | UNIX for Dummies Questions & Answers | 3 | 09-10-2007 02:51 PM |
| i need a scipt to email users with idle processes!? | sheppy28 | Shell Programming and Scripting | 0 | 02-02-2007 04:08 PM |
| Displaying the processes of users | olimiles | Shell Programming and Scripting | 2 | 08-18-2006 02:57 PM |
| Users and processes | Chiefos | UNIX for Dummies Questions & Answers | 17 | 06-17-2006 04:16 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Processes and Users
Thx for all the help so far, I really appreciate it, this is the last task I have to do then I am no longer a trainee ^^, which means I can use whatever utility I want. :O
I need to write a script that does more or less what is shown below. The Users Name PID TTY TIME CMD 12345 pts/3 00:00:00 vim The Users2 Name2 PID TTY TIME CMD 12345 pts/2 00:00:00 vim Print out all users currently logged on to the system and display the processes they are running. The problem I am facing is I don’t know how to acquire the users name (the actual name not the Username), as for the format it has to be like shown above more or less. And again I cant use SED or Awk (I will be free to use them after am done with this ).So its gona be one of those while read line statements. So the 1 million dollar question is how I format it by field Will the cut command help me at all here? I am starting to think this guy uses Google to find the tasks that he wants me to do, This is unbelievably similar to what i want to do , maybe it is just an exercise that is given to most beginners or something.Thanks in advanced for any help. |
|
|||||
|
Quote:
The snippet of the code provided above deals only with the userID->userName mapping - not with the listing of processes. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|