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=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22683 invoked from network); 26 Feb 2022 22:18:19 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 26 Feb 2022 22:18:19 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 788D99B892; Sun, 27 Feb 2022 08:18:16 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id ED233944BA; Sun, 27 Feb 2022 08:16:15 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TdMegt7o"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id C94C2944BA; Sun, 27 Feb 2022 08:16:13 +1000 (AEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by minnie.tuhs.org (Postfix) with ESMTPS id BD63693D6E for ; Sun, 27 Feb 2022 08:16:12 +1000 (AEST) Received: by mail-pf1-f170.google.com with SMTP id u16so7714661pfg.12 for ; Sat, 26 Feb 2022 14:16:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tMZri2X3MGvS1ULSLk0i0cFLdqoFGKdV5Pmn/mnaRFA=; b=TdMegt7oq7Rpy99Z0gdu0W/Xm9S2SDVw7ttMu5Vmgh7gilXQSQ8EJOD17XjsSyGmEa jPbPAtI8T5UaUTbphD1DZcGioNAOeRuEEizqvfrYJhdOEaLX4wafTp6jlEFQqQPos+GW mDzAbzvw1JjyL7Xjm98Q0ROFOGeM+9mvdj59UoUIIBZCxdXbqMHW8moafwphbaVcAuD3 172Gi6U5mYuIZAGlFmib2Xa1gZDXJ9XQ7f8JuMw8/SbdekcAAZpd0vkh56oRp4ah9HyJ gHRSGghyzmfx1oSsWrs3JK2gGg/AsnRgV0OagX5x69VBKCBtmad99MmlZrSxnurR0fvo zikA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tMZri2X3MGvS1ULSLk0i0cFLdqoFGKdV5Pmn/mnaRFA=; b=va5ITR83F4FekrH4DaL4/pFcvGwgFVm8YwwBbe+mHCO6ayET2nwKF9PkNXlF50cGqF ImFCRg9jKXjNxg3+qLsv1osQb3wBZSwZVALjKo5B1igZSdalZrTaXIS4drNzgvFsHtqo 1pOkp+0xu+oiDOeO2ZveJx9DF75r/z1T+ZAkehZmgzDV4vzbk0BLQEBbzOLeIkoKZ90V 2uS+AtgwQKogcHzshiTKK3CbGrVawD3kuWm1ZY9YpenVHrhWWhKl/ZHpn7Nd64vym4Zh cyrLu9SBPDFI+iCfxoihJ8j6J9mqdbZOwa7qcSdpZue7zVDehaFn/C7Zj2XMGv5IxA3I 9mAw== X-Gm-Message-State: AOAM532mFEIA8eiHweQEz9XRjb6tpKSglzAF4hDxRyFKKYM51/TqSguD 0WfkZDsYmGWGAu4OVS1sGe2X/Q7iM0SjJhYvtrk= X-Google-Smtp-Source: ABdhPJxKba/8mRcC5L9sFA9tafwWcybxxn0Ss3swCS16ezLioc5BLO81dOixo1HX2jk+4y5E/Fp712dXz6bve8NoEWA= X-Received: by 2002:a62:fb0d:0:b0:4f1:a584:71f with SMTP id x13-20020a62fb0d000000b004f1a584071fmr14452500pfm.2.1645913772108; Sat, 26 Feb 2022 14:16:12 -0800 (PST) MIME-Version: 1.0 References: <202202262145.21QLjjR0024198@cuzuco.com> In-Reply-To: <202202262145.21QLjjR0024198@cuzuco.com> From: Rob Pike Date: Sun, 27 Feb 2022 09:16:01 +1100 Message-ID: To: Brian Walden Content-Type: multipart/alternative; boundary="000000000000b7b11905d8f32906" Subject: Re: [TUHS] run commands at login in v6 and stty 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: , Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --000000000000b7b11905d8f32906 Content-Type: text/plain; charset="UTF-8" Terminal input, shells and so on were all rudimentary by modern standards in v6. By v7 things had become more familiar to 21st century folks. But for v6, although it was an advancement on many systems extant at the time (although not all), the clunky nature of this generated a vast flurry of hackery around terminal drivers and shells. It's a messy history. For the record, our v5/v6 lab in Toronto had mostly paper terminals, despite being a graphics lab, and one of them, the DECWriter, didn't even have lower case. Be thankful for your current setup. One example of the limitations: in v6 you could not pipe into a shell script because the shell used the script itself as standard input. And the argument list was limited to 512 bytes.* But hey, in v1 there weren't even multipart path names. -rob * My first day at Google using Linux in 2002, I got "arg list too long" with a modest glob pattern, and thought, what, have we forgotten about dynamic memory allocation? Moving to a Unix system after a decade plus on Plan 9 was a shock. On Sun, Feb 27, 2022 at 8:48 AM Brian Walden wrote: > 6th Edition used the Thompson shell as /bin/sh. I don't think it had > those capabilities. Sometimes you could find an early version of the > Bourne shell in /bin/nsh (new shell) in v6. > > The 7th Edition made the Bourne shell /bin/sh. And there sometimes > you could find the Thompson shell in /bin/osh (old shell). > > Will Senn wrote: > > Login commands question: > > > > I'm sure it's simple, but I can't figure it out. How do I get something > > to run at login in v6? Right now, I use ed to create a file 'setprof' > > that contains: > > > > stty erase[space][backspace][return] > > stty nl0 cr0 > > > > Then after logging in: > > > > sh setprof > > > > It works, but, it is pretty clunky. > > > > stty question: > > > > So, I looked at stty.c and it looks like the following should work, if > > the terminal is sending ^H for backspace: > > > > #define BS0 0 > > #define BS1 0100000 > > > > modes[] > > ... > > "bs0", > > BS0, BS1, > > > > "bs1", > > BS1, BS1, > > > > > > but: > > > > stty bs0 > > or > > stty bs1 > > > > don't result in proper backspace handling.. > > > > but: > > > > stty[space][^h][return] > > > > > > works... > > > > Thoughts? > --000000000000b7b11905d8f32906 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Terminal input, shells and so on were all rudimentary by m= odern standards in v6. By v7 things had become more familiar to 21st centur= y folks. But for v6, although it was an advancement on many systems extant = at the time (although not all), the clunky nature of this generated a vast = flurry of hackery around terminal drivers and shells. It's a messy hist= ory.

For the record, our v5/v6 lab in Toronto had mostly= paper terminals, despite being a graphics lab, and one of them, the DECWri= ter, didn't even have lower case. Be thankful for your current setup.

One example of the limitations: in v6 you could not p= ipe into a shell script because the shell used the script itself as standar= d input. And the argument list was limited to 512 bytes.*

But hey, in v1 there weren't even multipart path names.

-rob

* My first day at Google us= ing Linux in 2002, I got "arg list too long" with a modest glob p= attern, and thought, what, have we forgotten about dynamic memory allocatio= n? Moving to a Unix system after a decade plus on Plan 9 was a shock.
=

On Sun, Feb 27, 2022 at 8:48 AM Brian Walden <tuhs@cuzuco.com> wrote:
6th Edition used the Thompson shell as /bin/s= h. I don't think it had
those capabilities. Sometimes you could find an early version of the
Bourne shell in /bin/nsh (new shell) in v6.

The 7th Edition made the Bourne shell /bin/sh. And there sometimes
you could find the Thompson shell in /bin/osh (old shell).

Will Senn wrote:
> Login commands question:
>
> I'm sure it's simple, but I can't figure it out. How do I = get something
> to run at login in v6? Right now, I use ed to create a file 'setpr= of'
> that contains:
>
>=C2=A0 =C2=A0 =C2=A0stty erase[space][backspace][return]
>=C2=A0 =C2=A0 =C2=A0stty nl0 cr0
>
> Then after logging in:
>
>=C2=A0 =C2=A0 =C2=A0sh setprof
>
> It works, but, it is pretty clunky.
>
> stty question:
>
> So, I looked at stty.c and it looks like the following should work, if=
> the terminal is sending ^H for backspace:
>
>=C2=A0 =C2=A0 =C2=A0#define BS0=C2=A0 =C2=A0 =C2=A00
>=C2=A0 =C2=A0 =C2=A0#define BS1=C2=A0 =C2=A0 =C2=A00100000
>
>=C2=A0 =C2=A0 =C2=A0modes[]
>=C2=A0 =C2=A0 =C2=A0...
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "bs0",
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 BS0, BS1,
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "bs1",
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 BS1, BS1,
>
>
> but:
>
>=C2=A0 =C2=A0 =C2=A0stty bs0
>=C2=A0 =C2=A0 =C2=A0or
>=C2=A0 =C2=A0 =C2=A0stty bs1
>
> don't result in proper backspace handling..
>
> but:
>
>=C2=A0 =C2=A0 =C2=A0stty[space][^h][return]
>
>
> works...
>
> Thoughts?
--000000000000b7b11905d8f32906--