Suggestions.

Ralph W. Reid rreid at sunset.net
Sun Aug 8 17:15:31 EDT 2004


Try the following, inserting your matching string as appropriate:

grep -A 1 string filename | grep -v string

HTH and have a _great_ day.

On Sat, Aug 07, 2004 at 12:35:58PM -0400, 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

-- 
Ralph.  N6BNO.  Wisdom comes from central processing, not from I/O.
rreid at sunset.net  http://personalweb.sunset.net/~rreid
Opinions herein are either mine or they are flame bait.
COSECANT (x) = COTAN (x) / TAN (x)




More information about the Speakup mailing list