[TUHS] A few comments on porting the Bourne shell
arnold at skeeve.com
arnold at skeeve.com
Sun Jan 1 20:44:37 AEST 2023
Chet Ramey <chet.ramey at case.edu> 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.
>
> Arnold Robbins built on that work and ported the v8-v10 shells to modern
> Linux versions. (I am sorry, I do not have a link right now.)
Sorry to say, it wasn't me. Geoff Collyer made the v9 sh portable
and it's available from his web site.
I did do stuff with the shell back in the 80s:
- I back-ported Ron Natalie's job control into the 4.2 BSD sh,
along with a history mechanism I wrote from scratch that was
inspired by csh. I posted the diffs in comp.sources.unix.
- A few very minor features were added to ksh at my suggestion.
ISTR that one was `set -A array-name value ...' but I don't see that
in current ksh93 doc.
- I was a reviewer for both editions of David Korn's book on ksh.
- I contributed to pdksh, although I don't remember what. The pdksh
doc lists my name though.
- In the early 90s I did a little banging on the vi mode in the
readline librar so that bash's vi mode would be closer to what
I'd been used to in ksh.
In the late 80s I got interested in awk and moved almost all my
personal scripting to awk, although I still do shell work at $DAYJOB
or for personal use as needed.
Arnold
More information about the TUHS
mailing list