[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: ps question
- From: Ahbaid Gaffoor <ahbaidg worldnet att net>
- To: redhat-list redhat com
- Subject: Re: ps question
- Date: Thu, 21 Sep 2000 18:24:33 -0500
How about:
ps -f -p pid | tail -n1 | awk '{print $1 $2 $5 $7}'
Hope it helps,
Ahbaid.
linda hanigan wrote:
> Hi all,
> I am using a system call to ps in a program I am writting.
> 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.
> Thanks
> Linda Hanigan
>
> _______________________________________________
> Redhat-list mailing list
> Redhat-list redhat com
> https://listman.redhat.com/mailman/listinfo/redhat-list
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]