Re: [Exim] queuerunner

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Phil Pennock
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [Exim] queuerunner
On 2000-10-27 at 17:11 -0400, George Schlossnagle gifted us with:
>     $count = `ps auxw| grep -v grep |grep  -c -- "exim -q";


That's missing a closing backtick (`).

Handy grep trick:

$count = `ps axuw | grep -c -- "[e]xim -q"`;

Generally, the [x] trick is very useful in greps where you want to avoid
getting the grep itself. [e] matches the one 'e', and nothing else, so
the 'exim's all match; but because the grep itself doesn't have "ex" in
it, it doesn't match.

I _think_ that I learnt that one from Aeleen Frisch's Essential System
Administration (1st Ed, though now in 2nd Ed). If you want to improve
your general Unix sysadmin skills, I can't commend this book highly
enough. 2nd Ed includes lots of Linux stuff too.
--
Civilisation: where they cut down the trees and name streets after them.