From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29446 invoked from network); 29 Mar 2021 20:51:24 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 29 Mar 2021 20:51:24 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id B6BFF9C861; Tue, 30 Mar 2021 06:51:18 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 0F2079C82B; Tue, 30 Mar 2021 06:51:02 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ucsc.edu header.i=@ucsc.edu header.b="VqiC67f5"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 737759C82B; Tue, 30 Mar 2021 06:50:59 +1000 (AEST) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by minnie.tuhs.org (Postfix) with ESMTPS id B6EEF9C829 for ; Tue, 30 Mar 2021 06:50:58 +1000 (AEST) Received: by mail-pj1-f44.google.com with SMTP id j6-20020a17090adc86b02900cbfe6f2c96so6542960pjv.1 for ; Mon, 29 Mar 2021 13:50:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucsc.edu; s=ucsc-google-2018; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=jyqXglhZBik7FnsYly28RfvPgPjAvFANSJZsBn5HByk=; b=VqiC67f5r9QNM49QLUX+aIYwwGIvzu7KHGPLleDvlYunUcC+LLnwOZ6FmEx1oMVfjc I8S5DWGIrRynXiL5CN7wlTl9dTKfPDxHqwo1vzm/+3Zwb/sHIkPRy10qAlzPxjbGc96N YZxLRv1fAkPzH83laz/9gSgJTbDOJeDbNcU3wzZH4wZEMcFRgNRG5oKB4EU25K6BVHhr tt5uZfJqokbEWLtltLwFCkwJunSLKPUoRq3nZ8Ml4A3TFqDQRmYY2NhAMRYmQkY3u1Ex 3AnmJZHMpUoSUm89i/qUJxiBOac2WU59sY1hlMqLsWU13FZH/iZ8KYcCV3dUwt+ledx9 xrdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=jyqXglhZBik7FnsYly28RfvPgPjAvFANSJZsBn5HByk=; b=F92dkDZwAhjjuhlnKG4wyy+O8Fb69gGDwrwFCAAcTMUKzSNZ6PfGBe4EPA78T8mHxh oxOqWjRuZ/4Vq5d9DtedtRHHl9q1DbxuT4YCMoQ5SQ2YJeTK6QLwuYaPgo6YczLw9c52 Bb/oyJ6OydiZlW54x7OXZs9SfuH4iWffipCKna5pFsWe2CsB0Elp+Tyz+aTXY69KjbzQ a80oVLg0GuihnWLbMmkL3tcG4/Svztz+rRH/xNR38jCC3QtHK8yCy5zTckpVWhSd4ytN T0kDbAealKlDiagoAJaNg8ufGy6VRxKAha9qq1Lg/TInTw2NtC6fFR0iIrkhQWCXLPZK N2Sg== X-Gm-Message-State: AOAM5310V7h0KIQrAMRvydqYSsw/ALJImbQtRejW9FLG6Shx2mr2WIPK wTk8wh58oSKOsrOw+fJRmGbdLQ== X-Google-Smtp-Source: ABdhPJwgZm7SmSzhiRRjZttZSD2n1V591UD/633ZgGHZqw1ZYS4Wb052wINxQHep85G1BXzZeA7MFA== X-Received: by 2002:a17:902:d694:b029:e6:bc94:4931 with SMTP id v20-20020a170902d694b02900e6bc944931mr30543822ply.6.1617051058284; Mon, 29 Mar 2021 13:50:58 -0700 (PDT) Received: from smtpclient.apple ([2601:647:cd02:8260:4d21:4f8a:128b:ab18]) by smtp.gmail.com with ESMTPSA id l19sm457938pjt.16.2021.03.29.13.50.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Mar 2021 13:50:57 -0700 (PDT) Message-Id: <4B1F03CA-6387-4FE1-8116-0CB7B5175DE7@ucsc.edu> Content-Type: multipart/alternative; boundary="Apple-Mail=_AC72C3F7-F959-4905-A624-27264CB5F985" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) Date: Mon, 29 Mar 2021 13:50:55 -0700 In-Reply-To: To: Rob Pike References: <20210329143449.GA28080@mcvoy.com> X-Mailer: Apple Mail (2.3654.80.0.2.43) Subject: Re: [TUHS] Remember the ed thread? X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Michael Usher via TUHS Reply-To: Michael Usher Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --Apple-Mail=_AC72C3F7-F959-4905-A624-27264CB5F985 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 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) =E2=80=94 Michael Usher Network Operations Manager University of California, Santa Cruz musher@ucsc.edu 831-459-3697 > On Mar 29, 2021, at 12:50 PM, Rob Pike wrote: >=20 > Ed is the standard editor. >=20 > -rob >=20 >=20 > On Tue, Mar 30, 2021 at 1:36 AM Larry McVoy > wrote: > I had *.clients.your-server.de = crawling mcvoy.com in violation of my > robots.txt. For whatever reason, the tty settings (or something)=20 > made vi not work, I dunno what the deal is, stty -tabs didn't help. >=20 > 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. >=20 > +1 for ed. It's how many decades old and still useful? >=20 >=20 > #!/usr/libexec/bitkeeper/bk tclsh >=20 > int > main(void) > { > FILE log =3D popen("/var/log/apache2/dns.l", "r"); > string buf, ip; > string dropped{string}; >=20 > fconfigure(log, buffering: "line"); > while (buf =3D ) { > unless (buf =3D~ /([^ ]+\.your-server\.de\.) /) = continue; > ip =3D $1;=20 > if (defined(dropped{ip})) continue; > dropped{ip} =3D "yes"; > warn("DROP ${ip}\n"); > system("/sbin/iptables -I INPUT -s ${ip} -j DROP"); > } > } --Apple-Mail=_AC72C3F7-F959-4905-A624-27264CB5F985 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 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)


=E2=80=94
Michael Usher
Network Operations = Manager
University of California, Santa Cruz
musher@ucsc.edu        = 831-459-3697

On Mar 29, 2021, at 12:50 PM, Rob Pike <robpike@gmail.com> = wrote:

Ed is the standard editor.

-rob


On Tue, Mar 30, 2021 at 1:36 AM Larry = McVoy <lm@mcvoy.com> = wrote:
I had *.clients.your-server.de crawling 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 =3D = popen("/var/log/apache2/dns.l", "r");
        string  buf, ip;
        string  dropped{string};

        fconfigure(log, buffering: "line");
        while (buf =3D <log>) {
                unless (buf =3D~ = /([^ ]+\.your-server\.de\.) /) continue;
                ip =3D $1;
                if = (defined(dropped{ip})) continue;
                dropped{ip} =3D = "yes";
                warn("DROP = ${ip}\n");
                = system("/sbin/iptables -I INPUT -s ${ip} -j DROP");
        }
}

= --Apple-Mail=_AC72C3F7-F959-4905-A624-27264CB5F985--