The problem: A file needs to have newlines inserted at the end of a record. The current record delimiter is the word “END”. My version of sed doesn’t recognize inserting “n” or “r”.
Solution: Use sed
and tr
sed -e 's/END/+/g' original.txt | tr "+" "n" > new.txt
The trick is making sure my orignial substitution {+} isn’t in the orignial file, easily checked bygrep -c "+" original.txt