I have a file that contains:
something something else something else again
I need a bash command, sed/grep w.e that will produce the fo
Use python:
s = file("filename.txt").read() while "\n\n\n" in s: s = s.replace("\n\n\n", "\n\n") import sys sys.stdout.write(s)