Hi
I would like to remove all lonely newlines from a text file. By that I mean that this text:
Code:
a a a
b b b
c c c
d d d
e e e
f f f
would become
Code:
a a a b b b c c c
d d d e e e
f f f
Any suggestions? I tried an ugly hack with tr and sed:
Code:
cat "$1" |tr "\n" "@"| sed 's/@@/\n/g'|sed 's/@/ /g'
But that really messed up stuff and I'm not surprised.