From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <001301c2df26$de171080$2a8be793@gli.cas.cz> From: "peter a. cejchan" To: <9fans@cse.psu.edu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0010_01C2DF2F.3FD0CA20" Subject: [9fans] \n\n\n to \n\n Date: Fri, 28 Feb 2003 13:42:34 +0100 Topicbox-Message-UUID: 75792f40-eacb-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. ------=_NextPart_000_0010_01C2DF2F.3FD0CA20 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable hi, (sorry for this off-topic question, but) i don't know how to translate triple newlines into double ones. i tried tr \n to something else and then sed, however, sed doesn't like long lines :-( any hint appreciated, thanks, regards, ++pac ------=_NextPart_000_0010_01C2DF2F.3FD0CA20 Content-Type: text/html; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable
hi,
(sorry for this off-topic question,=20 but)
i don't know how to translate triple = newlines into=20 double ones.
i tried tr \n to something else and = then=20 sed,
however, sed doesn't like long lines=20 :-(
any hint appreciated,
thanks, regards,
 
++pac
 
------=_NextPart_000_0010_01C2DF2F.3FD0CA20-- From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <2efc51fb86bf2f73c80609624ba2c218@plan9.bell-labs.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] \n\n\n to \n\n From: "Russ Cox" In-Reply-To: <001301c2df26$de171080$2a8be793@gli.cas.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Fri, 28 Feb 2003 13:11:48 -0500 Topicbox-Message-UUID: 758d5272-eacb-11e9-9e20-41e7f4b1d025 you could do it in sam: s/\n\n\n/\n\n/g From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Salomon To: 9fans@cse.psu.edu Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: [9fans] \n\n\n to \n\n Date: Fri, 28 Feb 2003 13:48:49 -0500 Topicbox-Message-UUID: 75a9b912-eacb-11e9-9e20-41e7f4b1d025 > however, sed doesn't like long lines > you could do it in sam: s/\n\n\n/\n\n/g Was the "stream sam" mentioned in the Structured Regular Expressions paper ever written - or can sam be run in streaming mode? --Joel 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/ From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: "Douglas A. Gwyn" Message-ID: <3E5FE8D6.1080206@null.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit References: Subject: Re: [9fans] \n\n\n to \n\n Date: Mon, 3 Mar 2003 10:09:09 +0000 Topicbox-Message-UUID: 76a27296-eacb-11e9-9e20-41e7f4b1d025 Joel Salomon wrote: > .. can sam be run in streaming mode? No, sam -d gets its commands from stdin, but you ought to be able to open from one stream and write to another, e.g. on Research Unix one could shuffle file descriptors in the Bourne shell (exec sometimes helped) and sam could read /dev/fd/4 and write /dev/fd/5 for example). A different form of plumbing. From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: "Steve Simon" To: 9fans@cse.psu.edu Subject: Re: [9fans] \n\n\n to \n\n In-Reply-To: <1900322893@snellwilcox.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Mon, 3 Mar 2003 11:14:30 +0000 Topicbox-Message-UUID: 76c40050-eacb-11e9-9e20-41e7f4b1d025 AGC wrote a stream sam in posix C: http://www.westley.demon.co.uk/src/ssam-1.9.tar.gz I always meant to have a look at it and never got round to it... -Steve From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200303031425.h23EPJM22744@augusta.math.psu.edu> To: 9fans@cse.psu.edu Subject: Re: [9fans] \n\n\n to \n\n In-Reply-To: Your message of "Mon, 03 Mar 2003 10:09:09 GMT." <3E5FE8D6.1080206@null.net> From: Dan Cross Date: Mon, 3 Mar 2003 09:25:19 -0500 Topicbox-Message-UUID: 76b8e008-eacb-11e9-9e20-41e7f4b1d025 > No, sam -d gets its commands from stdin, but you > ought to be able to open from one stream and write > to another, e.g. on Research Unix one could > shuffle file descriptors in the Bourne shell (exec > sometimes helped) and sam could read /dev/fd/4 and > write /dev/fd/5 for example). A different form of > plumbing. Hmm, sounds a lot like /fd/*. rc(1) lets you shuttle file descriptors around rather easily. - Dan C. From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <60319104ca5cfc24a5a1aea4b4b370b3@plan9.escet.urjc.es> To: 9fans@cse.psu.edu Subject: Re: [9fans] \n\n\n to \n\n From: Fco.J.Ballesteros In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Tue, 4 Mar 2003 11:26:22 +0100 Topicbox-Message-UUID: 785c2438-eacb-11e9-9e20-41e7f4b1d025 > AGC wrote a stream sam in posix C: And of course you can always wrap sam in a script just to pretend that you have ssam.