Understanding the Bourne Shell (was Re: Finding the last arg)

Brandon S. Allbery KB8JRR allbery at NCoast.ORG
Sun Jan 13 09:25:07 AEST 1991


As quoted from <1991Jan12.012225.6727 at robobar.co.uk> by ronald at robobar.co.uk (Ronald S H Khoo):
+---------------
| allbery at ncoast.ORG (Brandon S. Allbery KB8JRR) writes:
| > There is one other problem.  I daresay it would be possible to make Bourne
| > shell syntax a bit more "regular" by using a yacc grammar.  THIS WON'T WORK!
| > At least, not without making the shell much less useful
| 
| Well, the some of the chaps at research seem to be quite happy with "rc"
| and that's got a yacc grammar...  Apparently it was too painful to
| port /bin/sh to Plan 9 so Duff wrote "rc".  (He presented a paper on it
| to the UKUUG Summer Conference last year)
+---------------

I wondered if anyone would comment about that after I read the "rc" stuff.
However, "rc" follows the general Plan 9 form (which, many ages, ago, was the
general Unix form) of moving stuff into separate programs.  "rc" is, in many
ways, nowhere near as complex as even the V7 shell, much less the System V
shell; it can get away with simple means of handling interactiveness in
complex control structures.  I was able to handle interactive use simply in a
certain yacc grammar up to a certain point, then I had to start using context
flags all over the place to make interactive use behave in an intuitive way.
I don't recall what point it was, except that the program I was working on was
gradually turning into a shell, which is why I eventually scrapped it in favor
of using the existing shell.

++Brandon
-- 
Me: Brandon S. Allbery			    VHF/UHF: KB8JRR on 220, 2m, 440
Internet: allbery at NCoast.ORG		    Packet: KB8JRR @ WA8BXN
America OnLine: KB8JRR			    AMPR: KB8JRR.AmPR.ORG [44.70.4.88]
uunet!usenet.ins.cwru.edu!ncoast!allbery    Delphi: ALLBERY



More information about the Comp.unix.shell mailing list