Back to the main page

Mailing List Logs for ShadowRN

Message no. 1
From: Luke Kendall <luke@********.CANON.OZ.AU>
Subject: awk script: logfile --> Unix mail file
Date: Tue, 14 Feb 1995 00:41:31 +1100
This may be of some use - a rough script that takes the output
from a GET SHADOWRUN LOGxxxx request and turns it into a standard
Unix mail format file, for easy reading (Mail -f logxxx.mbox) ...

luke

log2mail:

#!/bin/sh
[ $# != 1 ] && echo "usage: $0 <logfile>" 2>&1 &&
exit 1
awk '
BEGIN {
started = 0
}

/^From owner-/ {
listfrom = $0
}

/^==*$/ {
printf("\n%s\n", listfrom)
started = 1
next
}

{
if (started)
print
}
' $1 > $1.mbox
ls -l $1.mbox

Further Reading

If you enjoyed reading about awk script: logfile --> Unix mail file, you may also be interested in:

Disclaimer

These messages were posted a long time ago on a mailing list far, far away. The copyright to their contents probably lies with the original authors of the individual messages, but since they were published in an electronic forum that anyone could subscribe to, and the logs were available to subscribers and most likely non-subscribers as well, it's felt that re-publishing them here is a kind of public service.