<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">What Leam said - single purpose greps in a pipeline - it's the UNIX way!(tm)<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 22, 2016 at 7:30 PM, Leam Hall <span dir="ltr"><<a href="mailto:leamhall@gmail.com" target="_blank">leamhall@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Why not "^def*buff*altplan$"? Then grep v out things you don't want.<br>
<br>
On 09/22/16 14:46, Neal Rhodes wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So, I need to look in about a bazillion source files for variants of<br>
<br>
DEFINE BUFFER SNORT FOR ALTPLAN.<br>
Define Buffer Blech for AltPlan.<br>
Def Buff Blurf for AltPlan.<br>
Def Buff Blurf for AltPlan.<br>
def buff blurf for altplan.<br>
define buff blurf for altplan.<br>
define buffer blorf for altplan.<br>
define new shared buffer blorf for altplan.<br>
<br>
And grap 3 lines before, 10 lines afterwards, source file and line#.<br>
<br>
I was thinking this would to it:<br>
<br>
grep -i -B 3 -A 10 -H -n -r -f buf-grep.inp * > buf.grep.out<br>
<br>
Where buf-grep.inp was<br>
<br>
def*buff*for*ALTPLAN<br>
<br>
def*buff*for*ARM<br>
<br>
def*buff*for*ARMNOTE<br>
<br>
Alas it is not thus, and the more I study the reg exp notes the more I<br>
see there error of my ways, and the less I see an expression that would<br>
work.<br>
<br>
Regards,<br>
<br>
<br>
Neal<br>
<br>
<br>
______________________________<wbr>_________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/li<wbr>stinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/li<wbr>stinfo</a><br>
<br>
</blockquote>
______________________________<wbr>_________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/li<wbr>stinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/li<wbr>stinfo</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Pete Hardie<br>--------<br>Better Living Through Bitmaps</div>
</div>