Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!usc!sdd.hp.com!uakari.primate.wisc.edu!caen!sol.ctr.columbia.edu!emory!att!cbnews!smk From: smk@cbnews.att.com (Stephen M. Kennedy) Newsgroups: comp.unix.shell Subject: Re: How to strip A NEWLINE Summary: What if last line ends with \? Message-ID: <1990Nov30.213238.21282@cbnews.att.com> Date: 30 Nov 90 21:32:38 GMT References: <25665@uflorida.cis.ufl.EDU> <1781@seti.inria.fr> Distribution: na Organization: AT&T Bell Laboratories Lines: 23 In article <1781@seti.inria.fr>, deschamp@minos.inria.fr (Philippe Deschamp) writes: > [sed script to remove \] > sed -e ': more > /:\\$/{ > N > s/:\\\n *:*/:/ > t more > }' Anybody got any ideas on how to make this script work on input of the form one:\ two:\ three:\ oops:\ Currently, the N command aborts and the script produces no output on the last iteration; I'd like it to just act as if the last \ wasn't there. Steve Kennedy smk@cbosgd.att.com smk@cbnews.att.com