The Unix Programming Environment

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

Lua error in package.lua at line 80: module 'strict' not found.

The Unix Programming Environment
English4.gif
Front cover of The Unix Programming Environment
Author Brian W. Kernighan and Rob Pike
Language English
Subject Computer programming
Publisher Prentice Hall
Publication date
1984
ISBN 0-13-937681-X

The Unix Programming Environment, first published in 1984 by Prentice Hall, is a book written by Brian W. Kernighan and Rob Pike, both of Bell Labs and considered an important and early document of the Unix operating system.

Unix philosophy

The book addresses the Unix philosophy of small cooperating tools with standardized inputs and outputs. Kernighan and Pike give a brief description of the Unix design and the Unix philosophy:[1]

<templatestyles src="Template:Blockquote/styles.css" />

Even though the UNIX system introduces a number of innovative programs and techniques, no single program or idea makes it work well. Instead, what makes it effective is the approach to programming, a philosophy of using the computer. Although that philosophy can't be written down in a single sentence, at its heart is the idea that the power of a system comes more from the relationships among programs than from the programs themselves. Many UNIX programs do quite trivial things in isolation, but, combined with other programs, become general and useful tools.

The authors further write that their goal for this book is "to communicate the UNIX programming philosophy."[2]

Content and topics

The book starts off with an introduction to Unix for beginners. Next, it goes into the basics of the file system and shell. The reader is led through topics ranging from the use of filters, to how to use C for programming robust Unix applications, and the basics of grep, sed, make, and awk. The book closes with a tutorial on making a programming language parser with yacc and how to use troff with ms and mm to format documents, the preprocessors tbl, eqn, and pic, and making man pages with the man macro set. The appendices cover the ed editor and the abovementioned programming language, named hoc, which stands for "high-order calculator".

C programming style

The book was written before ANSI C was first drafted; the programs in it follow the older K&R style. However, the source code available on the book's website has been updated for ANSI C conformance.

Editions

Notes

  1. Kernighan, Brian W. Pike, Rob. The UNIX Programming Environment. 1984. viii
  2. Kernighan, Brian W. Pike, Rob. The UNIX Programming Environment. 1984. viii