On Jan 6, 2020, at 2:55 PM, Chet Ramey
<chet.ramey(a)case.edu> wrote:
On 1/6/20 4:29 PM, Dave Horsfall wrote:
On Mon, 6 Jan 2020, arnold(a)skeeve.com wrote:
Would anyone who uses Bash regularly, both
interactively and
for scripting, really want to go back to using the V7 sh
for production work?
I have never used all the fancy stuff in BASH such as the
arithmetic
functions; I still use "expr" etc for portability.
Portability to what? The POSIX $((...)) arithmetic expansion is widely
implemented and near-universally available.
Some of the other things are more esoteric, but you should be able to
increase your expectation to POSIX features and still be sufficiently
portable.
Portability to v7, of course!
I mean, I’m joking, but also not.
I felt like v7 might be enough of a daily driver that I could port some fun stuff to it,
but…damn, even ex/vi 3.x is huge, jove will take a lot of work, and I can’t find a
minimalist screen editor in K&R C. The best I’ve managed is TE but although there is
presumably a Unix port, I couldn’t find it. Porting termcap and curses was easy, but….the
whole reason I want them, initially, is so that I don’t have to use ed. If anyone knows
of a small screen editor that will build easily on v7 I want to know about it.
This is in contrast to 2.11BSD, where, yeah, it’s just Unix, and especially with a TCP/IP
stack, is completely usable. The PDP-11’s 64K address space is constraining and (as it
turned out) influences the way I write programs—for my menu front end for ZIP, I started
with my usual technique of making a struct with all the fields I’d want for my menu
structure, and a linked list of those things, but that turned out to be a hog and a simple
**char plus some utility functions to index the elements ended up being completely
adequate.
Adam