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


Click here to return to the 'Norrow down that 'PS' output by piping it to 'GREP'' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Norrow down that 'PS' output by piping it to 'GREP'
Authored by: FlyBoy on Jun 01, '02 10:36:05PM

Or you could do the following and eliminate the grep process in the ps list:

ps ax | grep -v grep | grep pppd



[ Reply to This | # ]
Norrow down that 'PS' output by piping it to 'GREP'
Authored by: FlyBoy on Jun 01, '02 10:49:18PM

Here's an even better way to do it in one step:

kill -HUP `ps ax | grep -v grep | grep pppd | awk '{print $1}' `

This finds the process number for the pppd process and passes it to the kill command.



[ Reply to This | # ]
Norrow down that 'PS' output by piping it to 'GREP'
Authored by: ret on Jun 03, '02 02:36:54AM
grep pipe to grep? That's a cardinal sin! :-)

Do this:
ps ax | grep p[p]pd | ...

Using the regexp in there means the grep process won't match itself in the process listing.

cheers
RET

PS: How bad will the backslashitis be on this reply?

[ Reply to This | # ]