Chapter 3. The Unix Tools Philosophy

A tool is a simple program, usually designed for a specific purpose, it is sometimes referred to (at least throughout this document) as a command.

The “ Unix tools philosophy” emerged during the creation of the UNIXoperating system, after the breakthrough invention of the pipe '|' (refer to Chapter 6 for information on using the pipe).

The pipe allowed the output of one program to be sent to the input of another. The tools philosophy was to have small programs to accomplish a particular task instead of trying to develop large monolithic programs to do a large number of tasks. To accomplish more complex tasks, tools would simply be connected together, using pipes.

All the core UNIX system tools were designed so that they could operate together. The original text-based editors (and even TeXand LaTeX) use ASCII(the American text encoding standard; an open standard) and you can use tools such as; sed, awk, vi, grep, cat, more, tr and various other text-based tools in conjunction with these editors.

Using this philosophy programmers avoided writing a program (within their larger program) that had already been written by someone else (this could be considered a form of code recycling). For example, command-line spell checkers are used by a number of different applications instead of having each application create its own own spell checker.

This philosophy lives on today in GNU/Linux and various other UNIX system-based operating systems (FreeBSD, NetBSD, OpenBSD, etc.).