#!/bin/sh # From neil@essex.ac.uk Tue Feb 21 18:16:40 PST 1995 # The Amazing Automatic Lloyd Wood! lc=`awk 'BEGIN { hdr=1 }\ /^Stat/ { hdr=0 } { if (!hdr && $0!="") bdy_cnt++ } END { print bdy_cnt }\ ' $1` awk 'BEGIN { hdr=1; }\ /^From.*edu/ { us_site = 1; continue; } /^From.*com/ { us_site = 1; continue; } /^From.*mil/ { us_site = 1; continue; } /^Stat/ { hdr=0; where=pid%lc; continue; }\ { if (hdr==1)\ continue;\ if (here<=where && $0=="") {\ printf(">\n");\ continue;\ }\ if (here%s\n", $0);\ continue;\ }\ if (here==where) {\ if (us_site==1 && lc%3==0) {\ if (pid%3==0)\ printf("Stupid ");\ if (pid%3==1)\ printf("Ignorant ");\ if (pid%3==2)\ printf("Undereducated ");\ printf("American."); here++; continue; }\ if (lc%2==0)\ printf("bt, dt.\n");\ else {\ printf(">%s\nIHNJH, IJLS \"%s\".\n", $0, $0);\ }\ here++;\ }\ }\ END { printf("\nL.\n"); }\ ' lc=$lc pid=$$ $1