procmail
[Top] [All Lists]

greping a variable

1999-10-30 00:57:20
  If I extract something to MATCH, what would be the best way to grep
it? I have something like the following but am wondering if there is a
better way.

:0
* ^Header:[     ]*\/[^  ].*
*  0^0
*  1^0 ? echo ${MATCH} | grep -E -ie 'something{5,}'
{ /dev/null }

  Basically I want to grep a header for 5 or more instances of something
and if it suceeds then the score is successful, otherwise not. But what I
have noticed is that when it doesn't suceed, it reports "Program failure"
on the score line.
  Or would there be a better way to do what I'm screwing with above?

-- 
        S.Toms - tomas(_at_)primenet(_dot_)com - New homepage coming soon
                   SuSE Linux v6.2+ - Kernel 2.2.13

Research is what I'm doing when I don't know what I'm doing.
                -- Wernher von Braun

<Prev in Thread] Current Thread [Next in Thread>
  • greping a variable, S.Toms <=