Software Tools, by Brian Kernighan and P.J.Plauger, showed you step by step how to build a UNIX-like environment on any system that supported a decent Fortran compiler, including almost all the source you needed. By the time you finished all the exercises, you had [Ratfor], [roff], [m4], [ed], [grep], and other tools... the core of the UNIX command-line environment.