On Thu, Sep 21, 2000 at 05:51:17PM -0500, linda hanigan wrote:
| Hi all,
| I am using a system call to ps in a program I am writting.

A piece of nomenclature: you probably mean "the system() function". I
whinge about this merely because the term "system call" has a specific
concrete meaning: a call of one of the kernel API calls (open, exec,
etc - the primitives).

| I am using:
| ps -f -p pid 
| The output is
| UID        PID  PPID  C STIME TTY          TIME CMD
| general  16661 16660  0 17:34 pts/0    00:00:00 -bash
| 
| I would like the output to be
| general  16661 17:34   -bash
| 
| I can of course work with the output to make it look like
| I want.  However I was wondering if their was a way
| ps would allow me to select which fields I want to show.
| I know ps h -f -p pid  will get rid of the header.

Check out the -o option. Lets you pick and choose by supplying a crude
format string.

Cheers,
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

I will not be pushed, filed, stamped, indexed, briefed, debriefed or
numbered. I am a person. My life is my own.     - The Prisoner



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to