I have a problem replacing sed, and I hope one of you can help me. I am sure that I am missing something simple.
So, I have a file containing text and a quote. The quote itself can be on the same line or span multiple lines. I need a quote on a new line. An example file is shown.
And he said "This too
shall pass"
I need to change this to
And he said
"This too shall pass"
I tried the next saddle, but it didn’t work - everything seems to be in order, but failed to create a new line
/"This/ {
N
s/"This *\n*too *\n*shall *\n*pass"/\n"This too shall pass"/
}
source
share