[GLLUG] Replacing newlines in text file

Dylan dylan at dylan.me.uk
Sun Aug 30 09:38:14 UTC 2015


Hi List,

I have a text file with 'hard' newlines at the end of each 'line' (often 
mid-sentence,) and multiple newlines at the end of paragraphs. I need a 
simple incantation to change all occurrences of a *single* newline to a 
space, and leave the multiple newlines in place. Unfortunately I'm no 
good with regexp and my head is mushed with it after reading docs this 
morning.

Any pointers would be welcome - I've trued using a GUI text editor, but 
at over 100,000 'lines' that's causing problems...

Thanks
Dylan



More information about the GLLUG mailing list