SUMMARY: Sed Question
From: Cohen, Laurence (Laurence_Cohen_at_sra.com)
Date: 12/14/04
- Previous message: Sebastien Daubigne: "SUMMARY : Assigning T3+ IP without rebooting ?"
- Next in thread: Cohen, Laurence: "RE: SUMMARY: Sed Question"
- Maybe reply: Cohen, Laurence: "RE: SUMMARY: Sed Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 14 Dec 2004 11:10:58 -0500 To: "Cohen, Laurence" <Laurence_Cohen@sra.com>, <sunmanagers@sunmanagers.org>
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
- Previous message: Sebastien Daubigne: "SUMMARY : Assigning T3+ IP without rebooting ?"
- Next in thread: Cohen, Laurence: "RE: SUMMARY: Sed Question"
- Maybe reply: Cohen, Laurence: "RE: SUMMARY: Sed Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]