[TUHS] A few comments on porting the Bourne shell

Luther Johnson luther at makerlisp.com
Sat Dec 31 10:08:42 AEST 2022


The Almquist shell (ash) and Debian's version of it, "dash", are 
compatible re-implementations of the Bourne shell, and use much less 
resources, and therefore wind up being faster as processes come and go.

I use csh (tcsh) and bash at the command line, but straight Bourne shell 
language is preferred and recommended by many for shell programming, I 
used to use csh for that and got bitten by all the things that I later 
discovered, those in the know had been warning about for years. Also, 
"bash-isms", syntactic sugary things in bash had led me to use them as a 
crutch, my scripts got simpler and more to the point when I re-wrote 
them for Bourne shell language only. That was my experience. I think 
we'll always have some kind of Bourne shell as the script workhorse, at 
last in Linux/Unix start-up and other blood and guts stuff.

In John Gilmore's paper on porting BSD through gcc to get to 4.4, he 
also remarked on how the original Bourne shell code was difficult to port.

On 12/30/2022 01:02 PM, Larry McVoy wrote:
> On Fri, Dec 30, 2022 at 02:51:26PM -0500, Chet Ramey wrote:
>> On 12/30/22 1:25 PM, Paul Ruizendaal wrote:
>>> London and Reiser report about porting the shell that ???it required by far the largest conversion effort of any supposedly portable program, for the simple reason that it is not portable.??? By the time of SysIII this is greatly improved, but also in porting the SysIII user land it was the most complex of the set so far.
>> Have you read
>>
>> http://www.collyer.net/who/geoff/sh.tour.pdf
>>
>> and looked at http://www.collyer.net/who/geoff/v7sh.tar ?
>>
>> In the limited literature on Bourne Shell porting, this is authoritative.
> Is there are reason to hang on to the Bourne shell?  Maybe shell scripts?
> Does it perform better than ksh or bash?
>
> Don't get me wrong, I much prefer the sh syntax over csh syntax, but
> I'd never go back to the Bourne shell as my login shell.  Way too much
> useful stuff in ksh/bash.
>



More information about the TUHS mailing list