On Wed, Oct 19, 2005 at 04:49:15PM -0400, S.A. Birl wrote:
At the command-line:
% echo "From: Goodguys Inc." | fgrep -ei -f greenlist
From: Goodguys Inc.
% echo $?
0
So try this, and I think it'll give you the results you're looking for.
And the -i is optional, depending on your mood.
Running just (f)?grep with no string boundaries will
get you false matches.
(I ran the sed to obfuscate names on our system that I have
no particular right to publicize.)
% awk -F: '{print $1}' /etc/passwd | fgrep -ie dman | sed 's/^.\(.*dman\)/x\1/;
s/^\(dman\)./\1x/'
dmanxl
xriedman
xreedman
xfeldman
xgoodman
xedman
dman
xhindman
xgoodman
Suggest you use the -w switch to avoid this.
--
dman
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail