Linux append lines after a lines match

A

AJAY SHARMA

Guest
I want to append lines after a match in a file.
##file name is ssl.conf
##match is this

<Directory >
SSLOptions +StdEnvVars
</Directory>

after above line i need to append these lines

<Directory >
SSLRenegBufferSize 26215000
</Directory>

so final results should be like this
<Directory >
SSLOptions +StdEnvVars
</Directory>
<Directory >
SSLRenegBufferSize 26215000
</Directory>

######Thank You in Advance
 


Read each line into a variable, check if the variable contains the string, if it does then use sed
 

Members online


Top