Comment by emmelaich
3 hours ago
I don't know how real you want -- those criteria are probably self contradictory :-)
Marc Rochkind's book Avanced UNIX Programming implemented a basic shell, through iterations. You can see the first at e.g. here https://github.com/gmarler/AUPv2/blob/master/c5/sh0.c
It might be a bit old too. The book is very good but again, quite old. There seem to be free copies of it on the net.
BTW, does anyone know if Marc Rochkind is alive? His site basepath.com seems to be for sale :-(