Hi Greg,
That's all I've time for at the moment, but others may chip in and this saves them covering some of the ground.
Ken's mhl(1) suggestion is what I would have tried. But there's also
non-nmh solutions, e.g. sed or awk if you're familiar with those.
This prints all the Foo fields, each on a line, joining continuation lines.
#! /usr/bin/gawk -bf
BEGIN {
IGNORECASE = 1
}
pending {
if (/^[ \t]/) {
printf " %s", $0
} else {
print ""
pending = 0
}
}
/^foo[ \t]*:/ {
printf "%s:%s", FILENAME, $0
pending = 1
next
}
/^$/ {
nextfile
}
END {
if (pending)
print ""
}
--
Cheers, Ralph.
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: format and output all received: lines in an e-mail message, Ken Hornstein |
|---|---|
| Next by Date: | Re: format and output all received: lines in an e-mail message, Paul Fox |
| Previous by Thread: | Re: format and output all received: lines in an e-mail message, Ralph Corderoy |
| Next by Thread: | Re: format and output all received: lines in an e-mail message, Ken Hornstein |
| Indexes: | [Date] [Thread] [Top] [All Lists] |