[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: quick scripting question - finding occurrence in many lines



Andrew Sackville-West wrote:
> On Mon, Nov 06, 2006 at 01:10:08AM +1100, John O'Hagan wrote:
>> Or the whole thing could even be done with (I think!):

>> #tr -d '\n' < IN | tr ' ' '\n' | grep -B1 Processor | grep -v 'Processor\|--'

> nice.

    Except for one problem.  Look at the OP's post and you'll see that the
word "Processor" is split by a new line.  So at no point does that word appear
in its entirety.

-- 
         Steve C. Lamb         | But who decides what they dream?
       PGP Key: 8B6E99C5       |   And dream I do...
-------------------------------+---------------------------------------------

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: