|
|||||||||||
|
Re: Editing a text file with sed
From: Joe Hart <j.hart(at)orange.nl>
Date: Fri Aug 31 2007 - 16:29:55 EDT
Thank you everyone, that little bit of perl seems to work, and yes I did want to keep the blank line so I end up with: perl -00 -pe 's/\n+(?!$)/ /g;' < 1.txt > 2.txt which is exactly what is written above - the second substitution. I did use the dos2unix command first which may have helped. In any event, my problem is solved and I am a happy camper. I knew it could be done, and in the process I have learned quite a bit about regex and even can get a clue what that perl is doing, although I am still not quite capable of creating such a masterpiece of a line. Joe -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.orgReceived on Fri Aug 31 16:30:04 2007 This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 03:27:25 EDT |
||||||||||
|
|||||||||||