Remove empty lines from file

Bradley Giesbrecht pixilla at macports.org
Fri Nov 18 14:21:47 PST 2011


I have tried 1 to 5 escapes to replace a newline and/or carriage returns with nothing.

reinplace "s|\n||g" file_path
also
reinplace -E "s|\n||g" file_path

Looking at other ports I see 1, 2 and 3 escapes inside double quotes.

Does anyone have an known working example?


Regards,
Bradley Giesbrecht (pixilla)






More information about the macports-dev mailing list