The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Rob Pike <robpike@gmail.com>
To: Brian Walden <tuhs@cuzuco.com>
Cc: TUHS main list <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] run commands at login in v6 and stty
Date: Sun, 27 Feb 2022 09:16:01 +1100	[thread overview]
Message-ID: <CAKzdPgxxgzc9UR9SsXo=y1+wc29Vx4A3k+AhiR1vgdp5k4PdLw@mail.gmail.com> (raw)
In-Reply-To: <202202262145.21QLjjR0024198@cuzuco.com>

[-- Attachment #1: Type: text/plain, Size: 2383 bytes --]

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 <tuhs@cuzuco.com> 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?
>

[-- Attachment #2: Type: text/html, Size: 3231 bytes --]

  reply	other threads:[~2022-02-26 22:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-26 21:45 Brian Walden
2022-02-26 22:16 ` Rob Pike [this message]
2022-02-27 20:32 ` Sven Mascheck
  -- strict thread matches above, loose matches on Subject: below --
2022-02-28  1:04 Douglas McIlroy
2022-02-28  7:22 ` Rob Pike
2022-02-28 14:07   ` Larry McVoy
2022-02-28 18:47     ` Dan Cross
2022-02-28 19:25       ` Dan Cross
2022-02-28 21:25         ` markus schnalke
2022-02-28 19:26       ` Clem Cole
2022-02-28 20:03         ` Adam Thornton
2022-02-28 18:18 ` Warner Losh
2022-02-27  7:48 Noel Chiappa
2022-02-26 20:39 Will Senn
2022-02-26 21:03 ` Michael Kjörling
2022-02-26 22:49 ` Clem Cole
2022-02-26 23:12   ` Rob Pike
2022-02-27  0:46     ` Clem Cole
2022-02-27 15:01     ` Larry McVoy
2022-02-27 17:10       ` Clem Cole

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKzdPgxxgzc9UR9SsXo=y1+wc29Vx4A3k+AhiR1vgdp5k4PdLw@mail.gmail.com' \
    --to=robpike@gmail.com \
    --cc=tuhs@cuzuco.com \
    --cc=tuhs@minnie.tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).