Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Keep track of stopped processes via shell variables' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Keep track of stopped processes via shell variables
Authored by: LC on Dec 15, '03 12:42:31PM
Oh yeah, to make those greps correct (in case there are multiple binaries running with similar names), need to --
ps -ax | grep '[k]ext' | head -1 | awk '{print $1}'
i.e. use head or tail to stuff just the first one into your variable; Larry.

[ Reply to This | # ]