Sed Question

From: Cohen, Laurence (Laurence_Cohen@sra.com)
Date: Mon Dec 13 2004 - 14:19:13 EST


I'm trying to use sed to edit a file and add a line after finding several
existing lines in a row. For example, the file contains lines

I am trying to add a line
after this text only if
all lines of text in this message
are found in this order.

I want this to read

I am trying to add a line
after this text only if
all lines of text in this message
are found in this order.
It worked! I've added the line!

I've tried using the N and a\ commands to do this, but it doesn't seem to
work if you have more than two lines to join. Any ideas?

Thanks!

Laurence H. Cohen
ISM System Administrator
SRA International
703-653-5371
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:29:51 EDT