#!/usr/local/bin/nawk -f # # Strip headers and other junk from uuencoded data in mail or news # /^begin [0-9][0-9][0-9] / { ok = 1 } /^M[^a-z]+$/ && (length == 61 || length == 62) { ok = 1 } /[Cc]ut [Hh]ere/ { ok = 0; next } /^END-----/ { ok = 0; next } /^$/ { ok = 0; next } { if (ok) print } /^end$/ { ok = 0 } .