[TUHS] run commands at login in v6 and stty

Brian Walden tuhs at cuzuco.com
Sun Feb 27 07:45:45 AEST 2022


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?


More information about the TUHS mailing list