|
|||||||||||
|
Re: AWKing for PIDs (was Re: NetBSD style rc.d scripts?)
From: Christoph Moench-Tegeder <cmt(at)rz.uni-karlsruhe.de>
Date: Fri Jan 31 2003 - 13:25:03 EST ## Michael Erdely (mike@erdelynet.com):
For easy use:
ps -axo pid,ppid,command | awk "\$3==\"$1\" && \$2==\"1\" {print \$1}"
}
in your .profile. Saves two processes, too (why run grep if you have awk already running?)
Regards,
-- Spare SpaceReceived on Fri Jan 31 13:27:24 2003 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:48:29 EDT |
||||||||||
|
|||||||||||