[TUHS] Shell control through external commands

Diomidis Spinellis dds at aueb.gr
Thu Jul 14 23:18:43 AEST 2016

I remember hearing that originally the Unix shell had control structures 
(e.g. if, while, case) implemented through external commands.  However, 
I can't see this reflected in the source code.  The 7th Edition Bourne 
shell has these commands built-in (usr/src/cmd/sh/cmd.c), while the 6th 
Edition (usr/source/s2/sh.c) seems to lack them completely.

The only external command I found was glob, which performed wildcard 

Am I missing something?  Was this implemented in a version that was 
never released?  If so, does anyone know how this implementation worked? 
  (Nested commands might require holding some sort of globally 
accessible stack.)

More information about the TUHS mailing list