procmail
[Top] [All Lists]

Re: Message count

1999-03-29 10:54:37
On Thu, 25 Mar 1999, Timothy J Luoma wrote:

Replying to message of Wed, 24 Mar 1999 12:01:46 -0600
      from Tim Walberg <walberg(_at_)cig(_dot_)mot(_dot_)com>
      regarding ``Re: Message count''
      
Not 100% bullet proof, but try
cat ${MAILFILE} | grep '^From ' | wc -l

Heh... where's that Useless Use of cat Award ?

Right next to the Useless Use of wc Award.  :-)
 
The same thing can be written

      grep '^From ' ${MAILFILE} | wc -l

which is slightly more efficient.

And as David said

grep -c '^From ' ${MAILFILE} is even more efficent.

Or as an alias for t/csh:

grep -c '^From ' \!*

-- 
On Monday mornings I am dedicated to the proposition that all men are
created jerks.
                -- Avery

<Prev in Thread] Current Thread [Next in Thread>