Enhanced port of Thompson shell from V6 UNIX
