From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: Ralph Corderoy Message-ID: <27a4.3e5fba41.a4a2b@blake.inputplus.co.uk> References: <001301c2df26$de171080$2a8be793@gli.cas.cz> Subject: Re: [9fans] \n\n\n to \n\n Date: Mon, 3 Mar 2003 10:08:59 +0000 Topicbox-Message-UUID: 76adafc6-eacb-11e9-9e20-41e7f4b1d025 Hi pac, > i don't know how to translate triple newlines into double ones. > i tried tr \n to something else and then sed, You could do it with sed. awk does just as well for a throw-away one-liner. awk '{c = c * !length * (c != 3) + !length} c < 3' > however, sed doesn't like long lines :-( Use GNU sed! Cheers, -- Ralph Corderoy. http://inputplus.co.uk/ralph/ http://troff.org/