You are here: Home > Honours project > Design

Design

A new model for the UNIX command line environment was developed to solve the problems with the traditional flat text manipulation mindset. Command line programs in the new system fall into one of three categories:

  1. Data generating programs
  2. Data filtering programs, and
  3. The shell

The data generating programs are those which take no input data on their standard input but generate some output on standard output. Some examples of data generating programs are ls, ps and df. In the new model, these data generating programs will now not be concened with the formatting of their output data. Instead, the data will be output as an XML document.

Since the data generating programs do not worry about formatting, yet they could still have formatting oriented command line options, any such formatting information should be stored in the output document so that it can be acted upon later.

The data filtering programs are those which read in some data from standard input, transform that input somehow, and write it out to standard output. A few such programs are cat, grep and sort.

Finally, the shell in the new model will be responsible for taking the XML output from the other programs and transforming it to a form suitable for the user to read on the terminal. To achieve this, the shell will read in the output from the last command in a pipeline and check its namespace. This namespace will be used to look up a table of XSL transformations. The appopriate stylesheet is then used to convert the XML document into a human readable form.

Cameron McCormack <clm@csse.monash.edu.au>