The sort of command line I can wind up typing
Here's the sort of command line I can wind up typing:
spam/wtd daemon | expsyslog.pl | 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. |
expsyslog.pl |
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 expsyslog.pl
, all of these are completely specific to
our environment and thus pretty uninteresting.)
|
|