[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

sed replacing newline



I have a file where all the text was put on one line.   I noticed where
there should have been a new line there was a ")" just before.  I tried to
use sed to add a newline.  I could not get it to work.

cat junk.txt | sed s/\)/\n/g

I tried quoting adding quotes.  Does anybody know if it is possible to do
this with sed?

I managed to accomplish what I wanted with

cat junk.txt | sed s/\)/\+/g | tr \+ \n

david




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]