Interesting - I'll try it. FWIW, your "echo "TO xyz.zoo" | egrep
'xyz*zoo'" does nothing from my (bash) command line. No complaints; but
no response.
- fleet -
And, not to be argumentative; but when I invoke 'man egrep' I get the grep
man pages - with a note that egrep = grep -E (and fgrep = grep -F).
On Mon, 29 Jul 2002, Udi Mottelo wrote:
To test matching strings I have a lazy version of David's rc:
I have a short file, named testrc:
VERBOSE=on
:0 B
* ()\/.+
/dev/nul
And I have alias (in bash):
alias pmtest='formail -s procmail testrc 2>&1 | grep ": M"'
Or in [t]csh:
alias pmtest 'formail -s procmail testrc |& grep ": M"'
Now, the command:
echo "From: helllllllooo" | pmtest
Will show you how procmail see the string.
You can play in two places: First you can feed the alias with
different input by the echo(1) command, and in the second place
you can change the right side of the "\/" in the testrc file
(just like David's way).
About the grep. The word "egrep" appears in procmailrc 11 times
while the word grep only one time(*). so, learn the egrep(1) man
instead of grep(1). Example how to play with egrep(1) from the
command line:
echo "TO xyz.zoo" | egrep 'xyz*zoo'
If egrep(1) matches something it will answer you.
Bye,
Udi
(*) Whene newbie reads the procmailrc man it's to be expected that he
remember the "egrep" instead of "grep":
yarkon~% man procmailrc | tr ' ' '\012' | grep '\<.*grep' | wc -l
11
yarkon~% man procmailrc | tr ' ' '\012' | grep '\<grep' | wc -l
1
yarkon~%
This is recursive example how to grep info from the man with
out reading the man (;-)
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail