sed question

Maarten Litmaath maart at cs.vu.nl
Thu Apr 13 04:19:43 AEST 1989


smaxwell at hpcuhc.HP.COM (Susan Maxwell) writes:
\        LINE I:    PROMPT>
\        LINE I+1:  >
\        LINE I+2:  <

\Whenever I see this series, I want to delete ALL THREE lines.

sed -n '
	/^PROMPT>$/{
		h
		n
		H
		/^>$/{
			n
			/^<$/b
			H
		}
		g
	}
	p
'
-- 
 "If it isn't aesthetically pleasing, |Maarten Litmaath @ VU Amsterdam:
  it's probably wrong." (jim at bilpin). |maart at cs.vu.nl, mcvax!botter!maart



More information about the Comp.unix.questions mailing list