jamesoff.net




9
Jul
2008
0

grepping the output of ccze

If you ever want to grep the output of ccze and found it didn’t work right, here’s the magic incantation to do it:

tail somefile | ccze -A -o noscroll | grep ...

-A makes ccze output ASCII sequences, and -o noscroll turns off the scroll option - whatever that is exactly. The man page says it’s a good idea to turn it off if you’re redirecting the output. Omitting it seems to make the output appear in lumps :)

For example, keep an eye on squid logs omitting all MSN crap:

tail -F access.log | ccze -A -C -o noscroll | grep -v gateway.dll

Permalink | Posted in FreeBSD Sysadmin and tagged  

Add a comment