The sort of command line I can wind up typing

April 23, 2006

Here's the sort of command line I can wind up typing:

spam/wtd daemon | | tcpwrhits -i | sed 10q | while (read foo) { n=`{echo $foo}; echo '| '^$n '|' `{checksmtp $n(2)}; }

(This will probably be wrapped in your browser, but it is all one line.)

I wrote that on the fly, in one pass, although I had to think it through a bit. I'm not going to claim that this is a typical Unix command line, but I do think it's the sort of thing experienced Unix users wind up doing every so often. It's also a good illustration of the density of little custom scripts in real environments.

What it produces is more or less the 'count / IP address / why' table from this week's spam summary, in DWikiText form ready to be dumped into place.

(The shell syntax will look a bit strange, since I use rc.)

Sidebar: an index of commands

spam/wtd Spits out the last week's worth of some sort of log, in this case the daemon syslogs. expand 'last message repeated N times' in syslog logs
tcpwrhits Generate a report of IP addresses rejected at connection time by our SMTP frontend (and how many times each was rejected)
checksmtp Tell me what our SMTP frontend would do for a connection from a given IP address.

(Except for, all of these are completely specific to our environment and thus pretty uninteresting.)

Written on 23 April 2006.
« Some CBL stats for the week ending on April 22nd, 2006
People are social »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sun Apr 23 03:55:38 2006
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.