SUMMARY: Sed Question

From: Cohen, Laurence <Laurence_Cohen_at_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
Received on Tue Dec 14 11:11:18 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:41 EST