procmail
[Top] [All Lists]

Re: Rejecting multiple names/subjects at once?

1996-07-08 08:29:47
I had suggested for Mike Rose:

| >Perhaps Mike would get better results if he escaped all the other periods
| >in the file, which apparently are supposed to match only literal periods:
| 
| >  u1(_at_)alpha\(_dot_)beta\(_dot_)gamma
| >  u2(_at_)delta\(_dot_)epsilon
| >  u3(_at_)foo\(_dot_)bar\(_dot_)baz
| >  u4(_at_)plugh\(_dot_)plover
| >  u5(_at_)xyzzy\(_dot_)com
| >  u6(_at_)frobozz\(_dot_)magic-wells\(_dot_)com
| >  mrose.stsci\.edu

Mike followed up:

| The problem I'm trying to solve is how to have one regexp per
| line, with an unlimited number of lines in the file.

That's precisely what fgrep's and egrep's -f option is for: reading a file to
get the text (for fgrep) or regexps (for egrep) that the program will look
for in the input.  So that's why Alan suggested using egrep -f in the first
place.