From af137@torfree.net Sat Nov 23 15:28:26 1996 Newsgroups: comp.editors Path: fu-berlin.de!news.mathworks.com!howland.erols.net!newsfeed.internetmci.com!news.webspan.net!ix.netcom.com!tor-nn1.netcom.ca!torfree!af137 From: af137@torfree.net (Al Aab) Subject: . sed numbers lines. tiny sed script Message-ID: Organization: Toronto Free-Net X-Newsreader: TIN [version 1.2 PL2] Date: Thu, 21 Nov 1996 13:28:07 GMT Lines: 13 sed = input.dat | sed N;s/\n/-/ --------------- join seders, we dicuss sed. --------------- -- =-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- al aab, seders moderator sed u soon it is not zat we do not see the s o l u t i o n -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ From bodec@sherwood.co.uk Sat Nov 23 15:28:36 1996 Path: fu-berlin.de!news.mathworks.com!EU.net!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!dispatch.news.demon.net!demon!bodecpc.sherwood.co.uk!not-for-mail From: Casper Boden-Cummins Newsgroups: comp.editors Subject: Re: . sed numbers lines. tiny sed script Date: Fri, 22 Nov 1996 13:33:53 -0800 Lines: 11 Message-ID: <848669579.28985.0@bodecpc.sherwood.co.uk> References: NNTP-Posting-Host: bodecpc.sherwood.co.uk X-NNTP-Posting-Host: bodecpc.sherwood.co.uk X-Mailer: Mozilla 3.0 (Win16; I) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Al Aab wrote: > > sed = input.dat | sed N;s/\n/-/ That's neat. The only thing to watch for is the semi-colon under UNIX. Since this is intrepreted as a command delimiter, the second command string must be quoted: sed = input.dat | sed 'N;s/\n/-/' Casper Boden-Cummins.