[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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

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!


Andrew Stribblehill
Systems programmer, IT Service, University of Durham, England

Reply to: