Suggestions.

Chuck Hallenbeck chuckh at sent.com
Sat Aug 7 12:49:58 EDT 2004


Hi Keith,

How about piping the output of your two-line grepper into another grep,
this time outputting only those lines that do not contain your search
string?

HTH
Chuck


On Sat, 7 Aug 2004, Keith Watson wrote:

> Folks,
>
> I need a suggestion or two for a dilemma that I am facing. I have
> a file which I am using grep to return a line with a particular
> search string and the following line.
>
> grep -A 1 string filename
>
> Here's the dilemma. There are multiple instincenses of the string
> so I have multiple two line returns. This is good, but what I
> really want is the second line only. Problem is that the second
> line has no common string on which to search, hence the search on
> line one. Anyone got any suggestions?
> --
> Keith Watson
> kwatson at smed.yi.org
>
> Among the major impediments to discovery are not the ignorant
> but those with illusions of knowledge.    - B. Alan Wallace
>
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>

-- 
The Moon is Waning Gibbous (52% of Full)
My home page is at http://www.mhcable.com/~chuckh




More information about the Speakup mailing list