Article View: comp.editors
Article #3531Re: SED Question
From: Joe Grace
Date: Wed, 12 Apr 1989 17:03
Date: Wed, 12 Apr 1989 17:03
13 lines
956 bytes
956 bytes
John is definitely right about the "$" and bugs, even his sed style is
better (Thanks!). But I just thought about another way you *could* do
it using the (new :-) "$" feature assuming your sed hold buffer is big
enough (likely, it won't be :-( :-( :-(). But this script is the
simplest so far, so...
sed -n -e 'H;${;x;s@^\(.\)\(.*\)@\2\1@;s@PROMPT>\n>\n<\n@@g;s@\n$@@;p;}'
= Joe =
Joe Grace
ARPA: jgrace@bbn.com
UUCP: {harvard,husc6,decvax,etc.}!bbn!jgrace
Technical Details
Message-ID:
<38585@bbn.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bbn!bbn.com!jgraceReferences:
<2360001@hpcuhc.HP.COM> <38564@bbn.COM> <10191@megaron.arizona.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bbn!bbn.com!jgrace From: jgrace@bbn.com (Joe Grace) Newsgroups: comp.editors Subject: Re: SED Question Keywords: sed Message-ID: <38585@bbn.COM> Date: 12 Apr 89 17:03:25 GMT References: <2360001@hpcuhc.HP.COM> <38564@bbn.COM> <10191@megaron.arizona.edu> Sender: news@bbn.COM Reply-To: jgrace@porter-square.BBN.COM (Joe Grace) Organization: Bolt Beranek and Newman Inc., Cambridge MA Lines: 13