sure it does, but if you want to also remove the quotes you need to change
it to:
FROM=`formail -z -xFrom: | \
nawk '{a=$0; sub(/[^ ]*(_at_)[^ ]*/,"",a);if(a=="") print $0; else {gsub(/
*["()<>]/, "",a);print a}}'`
and you can use gawk rather than nawk.
-----Original Message-----
From: Timothy J. Luoma [mailto:tjlists(_at_)bigfoot(_dot_)com]
Sent: Wednesday, March 14, 2001 10:08 AM
To: Geoff Mulligan; Donal Patrick Conway;
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: RE: Space at start of name
Would it handle
From: "Geoff T. Mulligan" <geoff(_at_)hz(_dot_)com>
Just curious
-----Original Message-----
From: Geoff Mulligan [mailto:geoff(_at_)mulligan(_dot_)com]
Sent: Wednesday, March 14, 2001 11:42 AM
To: Timothy J. Luoma; Donal Patrick Conway;
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: RE: Space at start of name
Here is my solution for grabbing the real name. If the only text is the
email address it grabs that. It does it with two processes rather than
four.
It handles:
From: Geoff Mulligan <geoff(_at_)hz(_dot_)com>
From: geoff(_at_)hz(_dot_)com (Geoff Mulligan)
From: geoff(_at_)hz(_dot_)com
FROM=`formail -z -xFrom: | \
nawk '{a=$0; sub(/[^ ]*(_at_)[^ ]*/,"",a);if(a=="") print $0; else {gsub(/
*[()<>]/, "",a);print a}}'`
If you don't want to capture email addresses you can use this
FROM=`formail -z -xFrom: | \
nawk '{sub(/[^ ]*(_at_)[^ ]*/,""); gsub(/ *[()<>]/, "");print $0}}'`
geoff
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail