SLUG Mailing List Archives
Re: [SLUG] bash question - how to tell if apache has stopped?
- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] bash question - how to tell if apache has stopped?
- From: Peter Hardy <peter@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 10 Jan 2006 07:11:14 +1100
On Mon, 2006-01-09 at 22:48 +1100, Ben Donohue wrote:
> ps ax|fgrep pppd|fgrep -v fgrep > /dev/null || /usr/sbin/pppd
Just a neat little trick that I picked up... on this list, I think, some
time in the dim past.
You can put square brackets around some of the process name you're
looking for to stop the fgrep command from appearing in the results.
ie: `fgrep pppd|fgrep -v fgrep` can be replaced with just `fgrep [p]ppd`