[plug] Small problem with cut
Bernd Felsche
bernie at innovative.iinet.net.au
Sun May 16 11:10:37 WST 2004
On Sunday 16 May 2004 02:14, Sawan Vithlani wrote:
> Hello All.
>
> I have a small problem with using the cut utility:
>
> I want to grab the pid of a certain process, so try this:
>
> ps ux|grep "kdeinit: konqueror -session"
>
> This gives me the whole process line, the second field of which is the
> pid as shown:
>
> sawan 6460 0.3 11.8 77976 61448 ? S May14 7:08 kdeinit:
> konqueror -session
> 113ffb8855000108305114500000066510347_1084124886_479563
Why don't you use /proc ?
e.g.
grep -l "kdeinit: konqueror -session" /proc/[1-9]*/cmdline | cut -d/ -f 3
--
/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ / ASCII ribbon campaign | I'm a .signature virus!
X against HTML mail | Copy me into your ~/.signature
/ \ and postings | to help me spread!
More information about the plug
mailing list