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


PID | 18 comments | Create New Account
Click here to return to the 'PID' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
PID
Authored by: Mithrandir on Jan 20, '02 08:13:18AM

In answer to your question: to get the pid. Is there a better way?

If there is a better way I've never seen it (not that I am all seeing.) I have seen other methods such as with Perl but I don't think either is better. Your method should be solid.

M



[ Reply to This | # ]
another way to get the pid
Authored by: garbanzito on Jan 24, '02 07:34:55PM
if you're going to have the user choose from a list, why not use the list that ps provides in the first place, then you don't have to grep to find the pid. i put a crude example of this quick & dirty renice. it could be improved, especially if the filename were extracted from the command path. but i think Nicer is pretty nice. it does a couple of other things too.

[ Reply to This | # ]