Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

add new line with sed

807559Sep 1 2004 — edited May 14 2010
Hello,

I try to insert a new lines after a model line with a sed command in a script ,like :

Before :
### model line#####

After :
### model line#####
new line 1
new line 2

I try something like this, but the newlinecharacter in not good understand :
sed -e"s/### model line#####/### model line#####\nnew line 1\nnew line 2/g" my.cnf

Some know how do that ??

Thx
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 11 2010
Added on Sep 1 2004
5 comments
1,577 views