SUMMARY: Sed Question

From: Cohen, Laurence (Laurence_Cohen@sra.com)
Date: Tue Dec 14 2004 - 11:10:58 EST


I was able to use nawk to get this job done. Thanks for all of the
suggestions.

> -----Original Message-----
> From: Cohen, Laurence
> Sent: Monday, December 13, 2004 2:19 PM
> To: 'sunmanagers@sunmanagers.org'
> Subject: Sed Question
>
> 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:52 EDT