[Mailman-Users] Hint: mmdsr.sh and Mac OS X Leopard

Steve Burling srb at umich.edu
Thu Jan 3 16:24:57 CET 2008


Over the holiday, I took the opportunity to do a long-overdue hardware and 
OS upgrade of my home Mailman server.  I'd been running Mac OS X 10.3.9 
(!), and moved to a slightly-less-antique box running Mac OS X 10.5.1.

Mostly, everything went smoothly, but there were a few minor gotchas.  One 
was with mmdsr.sh, and I thought I might save some others the headache of 
figuring this out.  I was getting errors from the 'sort' invocation in the 
line that produces the "Hourly Summary of Posts":

$SED -e 's/^[A-Z][a-z][a-z] *[0-9]* //' -e 's/:.*$//' $TMPLOG | $UNIQ -c | 
$SORT -n +1 | $AWK '{ printf( "%8d  %02d:00-%02d:59\n", $1, $2, $2 ) }' >> 
$TMP

It turns out that according to:

<http://developer.apple.com/releasenotes/Darwin/RN-Unix03Conformance/index.html#//apple_ref/doc/uid/TP40004772-DontLinkElementID_5>

'sort' no longer supports the form 'sort +POS1 -POS2', instead needint the 
form 'sort -k POS1,POS2'.  Of course, In that form POS1 and POS2 are 
1-based rather than 0-based.  So the 'sort' part of mmdsr.sh line above 
becomes, instead,

$SORT -n -k 2

Hope this saves someone some head scratching...

-- 
Steve Burling                                    <mailto:srb at umich.edu>
University of Michigan, ICPSR                    Voice: +1 734 615.3779
330 Packard Street                               FAX:   +1 734 647.8700
Ann Arbor, MI 48104-2910


More information about the Mailman-Users mailing list