MLUG: Re: [MLUG] grepping the 9th line after a matching line
Re: [MLUG] grepping the 9th line after a matching line
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mike Miller wrote:
On Thu, 3 May 2007, Huggard, Arthur Charles (UMC-Student) wrote:

Correct me if I'm being too simplistic about this... but would

egrep -A9 [pattern] file | tail -n1

work?

nevermind... wouldn't work for multiple matches *duh*


Exactly. The second problem is if a second pattern match comes fewer than 9 lines after the preceeding match, the behavior of egrep -A is changed.


And that last issue will mess up my proposed solution also.




_______________________________________________ members mailing list EMAIL:PROTECTED http://mlug.missouri.edu/mailman/listinfo/members