Re: rarp
Quoting Branden Robinson <branden@debian.org>:
> On Tue, Aug 08, 2000 at 09:53:16AM +0100, Andrew Stribblehill wrote:
> > ed -s <<'eof' | while read line; do rarp -d $line; done
> > r !/sbin/rarp -a
> > 1d
> > %s/ .*$//
> > %p
> > eof
>
> Ooooh. An ed script. Break out your mood rings and fondue pots, we're
> gonna have a tupperware party.
>
> Sorry. Like the coelacanth, these beasts aren't often found in the wild
> anymore, having been largely driven from their ecological niche by sed,
> awk, and perl. :)
You just do this to wind people up, don't you?! OK, I'll take the
bait...
Ed scripts are a perfect way to edit files in-place,
programmatically. Awk and sed are basically stream editors, and
perl is most comfortable in this mode too.
However, I seem to have shot myself in the foot since I admit,
this script of mine ain't editing a file...
Just out of interest, how does one delete the first line in a sed
script? Damn thing always takes me a good 30 secs to fathom what
it does every time I look at it. And yes, I wrote it!
Cheerio,
Andrew Stribblehill
Systems programmer, IT Service, University of Durham, England
Reply to:
- Follow-Ups:
- Re: rarp
- From: Detlev Zundel <detlev.zundel@stud.uni-karlsruhe.de>
- Re: rarp
- From: Karl Hammar <karl@kalle.csb.ki.se>
- Re: rarp (and ed)
- From: phil@bolthole.com (Philip Brown)
- References:
- rarp
- From: Jacob Kuntz <jake@megabite.net>
- Re: rarp
- From: Andrew Stribblehill <a.d.stribblehill@durham.ac.uk>
- Re: rarp
- From: Branden Robinson <branden@debian.org>