[TUHS] A few comments on porting the Bourne shell

Larry McVoy lm at mcvoy.com
Sat Dec 31 14:40:49 AEST 2022


On Fri, Dec 30, 2022 at 08:18:06PM -0800, Bakul Shah wrote:
> On Dec 30, 2022, at 7:59 PM, Larry McVoy <lm at mcvoy.com> wrote:
> > 
> > For a login shell, bash is my shell of choice.  It's bloated but I'm
> > typing this on a 5 year old Lenova X1 Carbon with 16GB of memory and
> > 4 cores and it's fine.  It was fine a 133mhz Pentium.
> 
> I switched to zsh in 1993-94 when I found out it had sh compatible
> syntax but also had some useful features from csh (bang commands,
> a{b,c} expansion, aliases etc.). 

This should probably move to COFF (which unlike many other lists I've
been on, has critical mass in the "go over there" list).

You are the 2nd to say zsh is your login shell.  I tried it for a while,
my progression was ${I dunno} to csh, actually used Bourne shell as a
login shell for a while around 1985 or so, all of my login scripts, other
shell scripts, were Bourne shell, I think zsh was next, then sighed in
relief with the original ksh release that went out, and when bash came
around with portability to everywhere, it has been bash.  ksh93 was 
interesting but bash was good enough and clearly open source so...

For script portability, pure Bourne shell has been the win for at least
40 years.  I suspect my kids and their kids will be writing Steve's
syntax, that's a legacy.

For general purpose scripting, I've moved on.  I loved Perl4.  It's a
kitchen sink language but it so clearly had roots in the Bourne shell,
in awk, in sed.  It was trying to be all of those things in one language
and it mostly succeeded.  In the 40mhz SPARC days I actually advocated
for rewriting a ton of /usr/bin on SunOS in perl4 because it was so easy
and far more maintainable than the C versions.

These days perl is weird, the kids seem to like Python, I hate Python
because there is no printf in the base language.  How is that a thing?
But people like it.
-- 
---
Larry McVoy           Retired to fishing          http://www.mcvoy.com/lm/boat


More information about the TUHS mailing list