Been looking around for this but haven't been able to find anything.
I'd like to be able to add a new line after matching text in a line.
For example, say I got:
and after this line I'd like to add:Code:#output databases: mysql, snort, password yourpassword, more, blah
So far I got:Code:#output databases: mysql, snort, password yourpassword, more, blah darn right
As you can see I'm at a loss as what the second value should be. I'd like to be able to match this generically. Is this possible? Also does the first value (^output database$) appear right?Code:sed -i -e 's`^#output database$`#out$ \ darn right`g' file



Adv Reply

Bookmarks