[TUHS] Remember the ed thread?
Larry McVoy
lm at mcvoy.com
Tue Mar 30 06:55:59 AEST 2021
My high school had some computer, don't remember what, may have been a
PDP 11. The *only* terminal was a line printer, probably a DECwriter,
don't remember. I do remember it being about 130 columns.
I don't remember if it was the real ed or a clone, but the editor was
very similar to ed(1). And yes, it's the only way to go with a printer
console.
On Mon, Mar 29, 2021 at 01:50:55PM -0700, Michael Usher wrote:
> I think you can only truly appreciate ed when you were forced to use a DECwriter as your terminal because all the VT100s were in use. (Undergrad student lab)
>
>
> ???
> Michael Usher
> Network Operations Manager
> University of California, Santa Cruz
> musher at ucsc.edu 831-459-3697
>
> > On Mar 29, 2021, at 12:50 PM, Rob Pike <robpike at gmail.com> wrote:
> >
> > Ed is the standard editor.
> >
> > -rob
> >
> >
> > On Tue, Mar 30, 2021 at 1:36 AM Larry McVoy <lm at mcvoy.com <mailto:lm at mcvoy.com>> wrote:
> > I had *.clients.your-server.de <http://clients.your-server.de/> crawling mcvoy.com <http://mcvoy.com/> in violation of my
> > robots.txt. For whatever reason, the tty settings (or something)
> > made vi not work, I dunno what the deal is, stty -tabs didn't help.
> >
> > So I had to resort to ed to write and debug the little program below.
> > It was surprisingly pleasant, it's probably the first time I've used ed
> > for anything real in at least a decade. My fingers still know it.
> >
> > +1 for ed. It's how many decades old and still useful?
> >
> >
> > #!/usr/libexec/bitkeeper/bk tclsh
> >
> > int
> > main(void)
> > {
> > FILE log = popen("/var/log/apache2/dns.l", "r");
> > string buf, ip;
> > string dropped{string};
> >
> > fconfigure(log, buffering: "line");
> > while (buf = <log>) {
> > unless (buf =~ /([^ ]+\.your-server\.de\.) /) continue;
> > ip = $1;
> > if (defined(dropped{ip})) continue;
> > dropped{ip} = "yes";
> > warn("DROP ${ip}\n");
> > system("/sbin/iptables -I INPUT -s ${ip} -j DROP");
> > }
> > }
>
--
---
Larry McVoy lm at mcvoy.com http://www.mcvoy.com/lm
More information about the TUHS
mailing list