I have file which contains:
hello
test1
DocumentRoot /var/www/html/
test2
hey
Now I try to add the word "world
" under the line "DocumentRoot /var/www/html/
"
So that it will look like this:
hello
test1
DocumentRoot /var/www/html/
world
test2
hey
It's difficult for me because the line above contains "/
"
I tried this but it did not work:
sed 's/DocumentRoot /var/#www/#html/#\ /DocumentRoot /var/#www/#html/#\nworld/' file
It gave me a totally wrong output
hallo
test1
var/var/www/html/
test2
hey