[CentOS] sendmail and rbl blocking - generating statistics

Wed Mar 14 22:52:40 UTC 2007
John Summerfield <debian at herakles.homelinux.org>

Will McDonald wrote:
> On 14/03/07, John Summerfield <debian at herakles.homelinux.org> wrote:
>> Will McDonald wrote:
>> It might be quicker, but that doesn't make it more efficient;-)
> 
> And that's why I mentioned it'd be wise to test :) I know things are
> never cut 'n dried and it depends on log makeup, datasets and whatnot.
> There's always dozens of ways to do things and no one way is perfect.

Or even best for everyone.

> 
>> I often "evolve" my commandlines (I commonly use one that's 500+
>> characters long) and if I don't start with a cat I often wish I did:-/
> 
> I can't think of a single instance of needing to 'cat | somethingelse'
> unless 'somethingelse' doesn't accept STDIN unless explicitly told
> to. I could obviously be missing some corner case or just be ill
> educated? :)

cat /var/log/messages | grep
is more easily changed to include another file
cat /var/log/messages{.0,} | grep
than
grep cat /var/log/messages
to
grep -h cat /var/log/messages{.0,} | grep -h
Note, I'm often typing through a modem and have to contend with 
unpredictable response times.

Even worse is changing to include compressed files:
(gunzip -dc /var/log/messages.{4,3,2,1}.gz;cat /var/log/messages{.0,})\
	| grep


I need to do this kind of thing fairly often.


-- 

Cheers
John

-- spambait
1aaaaaaa at coco.merseine.nu  Z1aaaaaaa at coco.merseine.nu

Please do not reply off-list