I need to find text "A" and replace it with A B. The issue is that I need a new line between A and B. \n does not do the work. Any help would be much appreciated.
Thanks,
I need to find text "A" and replace it with A B. The issue is that I need a new line between A and B. \n does not do the work. Any help would be much appreciated.
Thanks,
Use perl
perl -p -i -e 's/A/A\nB/g' somefile
Cheers
ZB
Make a script file for sed, e.g....
s/A/A\
B/g
...use it like this...
sed -f myscript somefile