 UNIX commands on the APM

} setup cutils
to make these commands available.

!<ar - archive and library maintainer

AR(1)               UNIX Programmer's Manual                AR(1)

NAME
     ar - archive and library maintainer

SYNOPSIS
     ar key [ posname ] afile name ...

DESCRIPTION
     Ar maintains groups of files combined into a single archive
     --
     file.  Its main use is to create and update library files as
     used by the loader.  It can be used, though, for any similar
     purpose.  N.B: This version of ar uses a ASCII-format
                                    --
     archive which is portable among the various machines running
     UNIX.  Programs for dealing with older formats are avail-
     able: see arcv(8).
               ----

     Key is one character from the set drqtpmx, optionally con-
     ---
     catenated with one or more of vuaibclo. Afile is the archive
                                             -----
     file.  The names are constituent files in the archive file.
                -----
     The meanings of the key characters are:
                         ---

     d    Delete the named files from the archive file.

     r    Replace the named files in the archive file.  If the
          optional character u is used with r, then only those
          files with `last-modified' dates later than the archive
          files are replaced.  If an optional positioning charac-
          ter from the set abi is used, then the posname argument
                                                 -------
          must be present and specifies that new files are to be
          placed after (a) or before (b or i) posname.  Otherwise
                                              -------
          new files are placed at the end.

     q    Quickly append the named files to the end of the
          archive file.  Optional positioning characters are
          invalid.  The command does not check whether the added
          members are already in the archive.  Useful only to
          avoid quadratic behavior when creating a large archive
          piece-by-piece.

     t    Print a table of contents of the archive file.  If no
          names are given, all files in the archive are tabled.
          If names are given, only those files are tabled.

     p    Print the named files in the archive.

     m    Move the named files to the end of the archive.  If a
          positioning character is present, then the posname
                                                     -------
          argument must be present and, as in r, specifies where
          the files are to be moved.

     x    Extract the named files.  If no names are given, all
          files in the archive are extracted.  In neither case
          does x alter the archive file. Normally the `last-
          modified' date of each extracted file is the date when
          it is extracted. However, if o is used, the `last-
          modified' date is reset to the date recorded in the
          archive.

     v    Verbose.  Under the verbose option, ar gives a file-
                                              --
          by-file description of the making of a new archive file
          from the old archive and the constituent files.  When
          used with t, it gives a long listing of all information
          about the files.  When used with p, it precedes each
          file with a name.

     c    Create.  Normally ar will create afile when it needs
                            --             -----
          to.  The create option suppresses the normal message
          that is produced when afile is created.
                                -----

     l    Local.  Normally ar places its temporary files in the
                           --
          directory /tmp.  This option causes them to be placed
          in the local directory.

FILES
     /tmp/v*   temporaries

SEE ALSO
     
BUGS
     If the same file is mentioned twice in an argument list, it
     may be put in the archive twice.

     The `last-modified' date of a file will not be altered by
     the o option if the user is not the owner of the extracted
     file, or the super-user.
!>
!<awk - pattern scanning and processing language

AWK(1)              UNIX Programmer's Manual               AWK(1)

NAME
     awk - pattern scanning and processing language

SYNOPSIS
     awk [ -Fc ] [ prog ] [ file ] ...
             -

DESCRIPTION
     Awk scans each input file for lines that match any of a set
     ---                  ----
     of patterns specified in prog.  With each pattern in prog
                              ----                        ----
     there can be an associated action that will be performed
     when a line of a file matches the pattern.  The set of pat-
                      ----
     terns may appear literally as prog, or in a file specified
                                   ----
     as -f file.
           ----

     Files are read in order; if there are no files, the standard
     input is read.  The file name `-' means the standard input.
     Each line is matched against the pattern portion of every
     pattern-action statement; the associated action is performed
     for each matched pattern.

     An input line is made up of fields separated by white space.
     (This default can be changed by using FS, vide infra.) The
                                               ---- -----
     fields are denoted $1, $2, ... ; $0 refers to the entire
     line.

     A pattern-action statement has the form

          pattern { action }

     A missing { action } means print the line; a missing pattern
     always matches.

     An action is a sequence of statements.  A statement can be
     one of the following:

          if ( conditional ) statement [ else statement ]
          while ( conditional ) statement
          for ( expression ; conditional ; expression ) statement
          break
          continue
          { [ statement ] ... }
          variable = expression
          print [ expression-list ] [ >expression ]
          printf format [ , expression-list ] [ >expression ]
          next # skip remaining patterns on this input line
          exit # skip the rest of the input

     Statements are terminated by semicolons, newlines or right
     braces.  An empty expression-list stands for the whole line.
     Expressions take on string or numeric values as appropriate,
     and are built using the operators +, -, *, /, %,  and con-
     catenation (indicated by a blank).  The C operators ++, --,
     +=, -=, *=, /=, and %= are also available in expressions.
     Variables may be scalars, array elements (denoted x[i]) or
     fields.  Variables are initialized to the null string.
     Array subscripts may be any string, not necessarily numeric;
     this allows for a form of associative memory.  String con-
     stants are quoted "...".

     The print statement prints its arguments on the standard
         -----
     output (or on a file if >file is present), separated by the
                              ----
     current output field separator, and terminated by the output
     record separator.  The printf statement formats its expres-
                            ------
     sion list according to the format (see 
.
                                            ------

     The built-in function length returns the length of its argu-
                           ------
     ment taken as a string, or of the whole line if no argument.
     There are also built-in functions exp, log, sqrt, and int.
                                       ---  ---  ----      ---
     The last truncates its argument to an integer.
     substr(s, m, n) returns the n-character substring of s that
     ------ -  -  -              -                        -
     begins at position m.  The function
                        -
     sprintf(fmt, expr, expr, ...) formats the expressions
     ------- ---  ----  ----
     according to the printf(3S) format given by fmt and returns
                      ------                     ---
     the resulting string.

     Patterns are arbitrary Boolean combinations (!, ||, &&, and
     parentheses) of regular expressions and relational expres-
     sions.  Regular expressions must be surrounded by slashes
     and are as in egrep.  Isolated regular expressions in a pat-
                   -----
     tern apply to the entire line.  Regular expressions may also
     occur in relational expressions.

     A pattern may consist of two patterns separated by a comma;
     in this case, the action is performed for all lines between
     an occurrence of the first pattern and the next occurrence
     of the second.

     A relational expression is one of the following:

          expression matchop regular-expression
          expression relop expression

     where a relop is any of the six relational operators in C,
     and a matchop is either ~ (for contains) or !~ (for does not
     contain).  A conditional is an arithmetic expression, a
     relational expression, or a Boolean combination of these.

     The special patterns BEGIN and END may be used to capture
     control before the first input line is read and after the
     last.  BEGIN must be the first pattern, END the last.

     A single character c may be used to separate the fields by
                        -
     starting the program with
          BEGIN { FS = "c" }

     or by using the -Fc option.
                       -

     Other variable names with special meanings include NF, the
     number of fields in the current record; NR, the ordinal
     number of the current record; FILENAME, the name of the
     current input file; OFS, the output field separator (default
     blank); ORS, the output record separator (default newline);
     and OFMT, the output format for numbers (default "%.6g").

EXAMPLES
     Print lines longer than 72 characters:

          length > 72

     Print first two fields in opposite order:

          { print $2, $1 }

     Add up first column, print sum and average:

               { s += $1 }
          END  { print "sum is", s, " average is", s/NR }

     Print fields in reverse order:

          { for (i = NF; i > 0; --i) print $i }

     Print all lines between start/stop pairs:

          /start/, /stop/

     Print all lines whose first field is different from previous
     one:

          $1 != prev { print; prev = $1 }

SEE ALSO
     
     A. V. Aho, B. W. Kernighan, P. J. Weinberger, Awk - a pat-
                                                   ---   - ----
     tern scanning and processing language
     ---- -------- --- ---------- --------

BUGS
     There are no explicit conversions between numbers and
     strings.  To force an expression to be treated as a number
     add 0 to it; to force it to be treated as a string concaten-
     ate "" to it.
!>
!<cat - catenate and print

CAT(1)              UNIX Programmer's Manual               CAT(1)

NAME
     cat - catenate and print

SYNOPSIS
     cat [ -u ] [ -n ] [ -s ] [ -v ] file ...

DESCRIPTION
     Cat reads each file in sequence and displays it on the stan-
     ---            ----
     dard output.  Thus

                    cat file

     displays the file on the standard output, and

                    cat file1 file2 >file3

     concatenates the first two files and places the result on
     the third.

     If no input file is given, or if the argument `-' is encoun-
     tered, cat reads from the standard input file.  Output is
            ---
     buffered in 1024-byte blocks unless the standard output is a
     terminal, in which case it is line buffered.  The -u option
     makes the output completely unbuffered.

     The -n option displays the output lines preceded by lines
     numbers, numbered sequentially from 1.  Specifying the -b
     option with the -n option omits the line numbers from blank
     lines.

     The -s option crushes out multiple adjacent empty lines so
     that the output is displayed single spaced.

     The -v option displays non-printing characters so that they
     are visible.  Control characters print like ^X for control-
     x; the delete character (octal 0177) prints as ^?.  Non-
     ascii characters (with the high bit set) are printed as M-
     (for meta) followed by the character of the low 7 bits.  A
     -e option may be given with the -v option, which displays a
     `$' character at the end of each line.  Specifying the -t
     option with the -v option displays tab characters as ^I.

SEE ALSO
     
BUGS
     Beware of `cat a b >a' and `cat a b >b', which destroy the
     input files before reading them.
!>
!<cb - C program beautifier

CB(1)               UNIX Programmer's Manual                CB(1)

NAME
     cb - C program beautifier

SYNOPSIS
     cb

DESCRIPTION
     Cb places a copy of the C program from the standard input on
     --
     the standard output with spacing and indentation that
     displays the structure of the program.
!>
!<cdecl - Compose C declarations

CDECL(1)            UNIX Programmer's Manual             CDECL(1)

NAME
     cdecl - Compose C declarations

SYNOPSIS
     cdecl

DESCRIPTION
     Cdecl is a program for encoding and decoding C type-
     -----
     declarations.  It reads standard input for statements in the
     language described below.  The results are written on stan-
     dard output.

     Cdecl's scope is intentionally small.  It doesn't help you
     ----- -
     figure out storage classes or initializations.

COMMAND LANGUAGE
     There are four statements in the language.  The "declare"
     statement composes a C type-declaration from a verbose
     description.  The "cast" statement composes a C type-cast as
     might appear in an expression.  The "explain" statement
     decodes a C type-declaration, producing a verbose descrip-
     tion.  The "help" statement describes the others.

     The following grammar describes the language.  In the gram-
     mar, words in "<>" are non-terminals, bare lower-case words
     are terminals that stand for themselves.  Bare upper-case
     words are other lexical tokens: NOTHING means the empty
     string; NAME means a C identifier; NUMBER means a string of
     decimal digits; and NL means the new-line character.

     <program>    ::= NOTHING
                    | <program> <stat> NL
     <stat>       ::= NOTHING
                    | declare NAME as <decl>
                    | cast NAME into <decl>
                    | explain <cdecl>
                    | help
     <decl>       ::= array of <decl>
                    | array NUMBER of <decl>
                    | function returning <decl>
                    | function ( NAME ) returning <decl>
                    | pointer to <decl>
                    | <type>
     <cdecl>      ::= <cdecl1>
                    | * <cdecl>
     <cdecl1>     ::= <cdecl1> ( )
                    | <cdecl1> [ ]
                    | <cdecl1> [ NUMBER ]
                    | ( <cdecl> )
                    | NAME
     <type>       ::= <typename> | <modlist>
                    | <modlist> <typename>
                    | struct NAME | union NAME | enum NAME
     <typename>   ::= int | char | double | float
     <modlist>    ::= <modifier> | <modlist> <modifier>
     <modifier>   ::= short | long | unsigned

EXAMPLES
     To declare an array of pointers to functions like malloc(3),
     do declare fptab as array of pointer to function returning
     pointer to char The result of this command is char
     *(*fptab[])() When you see this declaration in someone
     else's code, you can make sense out of it by doing explain
     char *(*fptab[])() The proper declaration for signal(2) can-
     not be described in cdecl's language (it can't be described
                         -----
     in C either).  An adequate declaration for most purposes is
     given by declare signal as function returning pointer to
     function returning int The function declaration that results
     has two sets of empty parentheses.  The author of such a
     function might wonder where the parameters go.  declare sig-
     nal as function (args) returning pointer to function return-
     ing int provides the solution: int (*signal(args))()

DIAGNOSTICS
     The declare statement tries to point out constructions that
     are not supported in C.  Also, certain non-portable con-
     structs are flagged.

     Syntax errors cause the parser to play dead until a newline
     is read.

SEE ALSO
     Section 8.4 of the C Reference Manual.

BUGS
     The pseudo-English syntax is excessively verbose.
!>
!<cmp - compare two files

CMP(1)              UNIX Programmer's Manual               CMP(1)

NAME
     cmp - compare two files

SYNOPSIS
     cmp [ -l ] [ -s ] file1 file2

DESCRIPTION
     The two files are compared.  (If file1 is `-', the standard
                                      -----
     input is used.) Under default options, cmp makes no comment
                                            ---
     if the files are the same; if they differ, it announces the
     byte and line number at which the difference occurred.  If
     one file is an initial subsequence of the other, that fact
     is noted.

     Options:

     -l    Print the byte number (decimal) and the differing
           bytes (octal) for each difference.

     -s    Print nothing for differing files; return codes only.

SEE ALSO
     
DIAGNOSTICS
     Exit code 0 is returned for identical files, 1 for different
     files, and 2 for an inaccessible or missing argument.
!>
!<col - filter reverse line feeds

COL(1)              UNIX Programmer's Manual               COL(1)

NAME
     col - filter reverse line feeds

SYNOPSIS
     col [ -bfx ]

DESCRIPTION
     Col reads the standard input and writes the standard output.
     ---
     It performs the line overlays implied by reverse line feeds
     (ESC-7 in ASCII) and by forward and reverse half line feeds
     (ESC-9 and ESC-8).  Col is particularly useful for filtering
                         ---
     multicolumn output made with the `.rt' command of nroff and
                                                       -----
     output resulting from use of the tbl(1) preprocessor.
                                      ---

     Although col accepts half line motions in its input, it nor-
              ---
     mally does not emit them on output.  Instead, text that
     would appear between lines is moved to the next lower full
     line boundary.  This treatment can be suppressed by the -f
     (fine) option; in this case the output from col may contain
                                                 ---
     forward half line feeds (ESC-9), but will still never con-
     tain either kind of reverse line motion.

     If the -b option is given, col assumes that the output dev-
                                ---
     ice in use is not capable of backspacing.  In this case, if
     several characters are to appear in the same place, only the
     last one read will be taken.

     The control characters SO (ASCII code 017), and SI (016) are
     assumed to start and end text in an alternate character set.
     The character set (primary or alternate) associated with
     each printing character read is remembered; on output, SO
     and SI characters are generated where necessary to maintain
     the correct treatment of each character.

     Col normally converts white space to tabs to shorten print-
     ---
     ing time.  If the -x option is given, this conversion is
     suppressed.

     All control characters are removed from the input except
     space, backspace, tab, return, newline, ESC (033) followed
     by one of 7, 8, 9, SI, SO, and VT (013).  This last charac-
     ter is an alternate form of full reverse line feed, for com-
     patibility with some other hardware conventions.  All other
     non-printing characters are ignored.

SEE ALSO
     
BUGS
     Can't back up more than 128 lines.
     No more than 800 characters, including backspaces, on a
     line.
!>
!<comm - select or reject lines common to two sorted files

COMM(1)             UNIX Programmer's Manual              COMM(1)

NAME
     comm - select or reject lines common to two sorted files

SYNOPSIS
     comm [ - [ 123 ] ] file1 file2

DESCRIPTION
     Comm reads file1 and file2, which should be ordered in ASCII
     ----       -----     -----
     collating sequence, and produces a three column output:
     lines only in file1; lines only in file2; and lines in both
                   -----                -----
     files.  The filename `-' means the standard input.

     Flags 1, 2, or 3 suppress printing of the corresponding
     column.  Thus comm -12 prints only the lines common to the
     two files; comm -23 prints only lines in the first file but
     not in the second; comm -123 is a no-op.

SEE ALSO
     
!>
!<compress, uncompress, zcat - compress and expand data

COMPRESS(1)         UNIX Programmer's Manual          COMPRESS(1)

NAME
     compress, uncompress, zcat - compress and expand data

SYNOPSIS
     compress [ -f ] [ -v ] [ -c ] [ -V ] [ -b bits ] [ name ... ]
                                               ----     ----
     uncompress [ -f ] [ -v ] [ -c ] [ -V ] [ name ... ]
                                              ----
     zcat [ -V ] [ name ... ]
                   ----

DESCRIPTION
     Compress reduces the size of the named files using adaptive
     --------
     Lempel-Ziv coding.  Whenever possible, each file is replaced
     by one with the extension .Z, while keeping the same owner-
     ship modes, access and modification times.  If no files are
     specified, the standard input is compressed to the standard
     output.  Compressed files can be restored to their original
     form using uncompress or zcat.
                ----------    ----

     The -f option will force compression of name. This is useful
                                             ----
     for compressing an entire directory, even if some of the
     files do not actually shrink.  If -f is not given and
     compress is run in the foreground, the user is prompted as
     --------
     to whether an existing file should be overwritten.

     The -c option makes compress/uncompress write to the stan-
                         -------- ----------
     dard output; no files are changed.  The nondestructive
     behavior of zcat is identical to that of uncompress -c.
                 ----                         ----------

     Compress uses the modified Lempel-Ziv algorithm popularized
     --------
     in "A Technique for High Performance Data Compression",
     Terry A. Welch, IEEE Computer, vol. 17, no. 6 (June 1984),
                     ---- --------
     pp. 8-19.  Common substrings in the file are first replaced
     by 9-bit codes 257 and up.  When code 512 is reached, the
     algorithm switches to 10-bit codes and continues to use more
     bits until the limit specified by the -b flag is reached
     (default 16).  Bits must be between 9 and 16.  The default
                    ----
     can be changed in the source to allow compress to be run on
                                           --------
     a smaller machine.

     After the bits limit is attained, compress periodically
               ----                    --------
     checks the compression ratio.  If it is increasing, compress
                                                         --------
     continues to use the existing code dictionary.  However, if
     the compression ratio decreases, compress discards the table
                                      --------
     of substrings and rebuilds it from scratch.  This allows the
     algorithm to adapt to the next "block" of the file.

     Note that the -b flag is omitted for uncompress, since the
                                          ----------
     bits parameter specified during compression is encoded
     ----
     within the output, along with a magic number to ensure that
     neither decompression of random data nor recompression of
     compressed data is attempted.
     The amount of compression obtained depends on the size of
     the input, the number of bits per code, and the distribution
                              ----
     of common substrings.  Typically, text such as source code
     or English is reduced by 50-60%.  Compression is generally
     much better than that achieved by Huffman coding (as used in
     pack), or adaptive Huffman coding (compact), and takes less
     ----                               -------
     time to compute.

     Under the -v option, a message is printed yielding the per-
     centage of reduction for each file compressed.

     If the -V option is specified, the current version and com-
     pile options are printed on stderr.

     Exit status is normally 0; if the last file is larger after
     (attempted) compression, the status is 2; if an error
     occurs, exit status is 1.

SEE ALSO
     
DIAGNOSTICS
     Usage: compress [-dfvcV] [-b maxbits] [file ...]
             Invalid options were specified on the command line.
     Missing maxbits
             Maxbits must follow -b.
     file: not in compressed format
     ----
             The file specified to uncompress has not been
                                   ----------
             compressed.
     file: compressed with xx bits, can only handle yy bits
     ----                  --                       --
             File was compressed by a program that could deal
             ----
             with more bits than the compress code on this
                       ----
             machine.  Recompress the file with smaller bits.
                                                        ----
     file: already has .Z suffix -- no change
     ----
             The file is assumed to be already compressed.
             Rename the file and try again.
     file: filename too long to tack on .Z
     ----
             The file cannot be compressed because its name is
             longer than 12 characters.  Rename and try again.
             This message does not occur on BSD systems.
     file already exists; do you wish to overwrite (y or n)?
     ----
             Respond "y" if you want the output file to be
             replaced; "n" if not.
     uncompress: corrupt input
             A SIGSEGV violation was detected which usually means
             that the input file has been corrupted.
     Compression: xx.xx%
                  -- --
             Percentage of the input saved by compression.
             (Relevant only for -v.)
     -- not a regular file: unchanged
             When the input file is not a regular file, (e.g. a
             directory), it is left unaltered.
     -- has xx other links: unchanged
            --
             The input file has links; it is left unchanged.  See
             ln(1) for more information.
             --
     -- file unchanged
             No savings is achieved by compression.  The input
             remains virgin.

BUGS
     Although compressed files are compatible between machines
     with large memory, -b12 should be used for file transfer to
     architectures with a small process data space (64KB or less,
     as exhibited by the DEC PDP series, the Intel 80286, etc.)
!>
!<diff - differential file and directory comparator

DIFF(1)             UNIX Programmer's Manual              DIFF(1)

NAME
     diff - differential file and directory comparator

SYNOPSIS
     diff [ -l ] [ -r ] [ -s ] [ -cefh ] [ -b ] dir1 dir2
     diff [ -cefh ] [ -b ] file1 file2
     diff [ -Dstring ] [ -b ] file1 file2
              ------

DESCRIPTION
     If both arguments are directories, diff sorts the contents
                                        ----
     of the directories by name, and then runs the regular file
     diff algorithm (described below) on text files which are
     ----
     different.  Binary files which differ, common subdirec-
     tories, and files which appear in only one directory are
     listed.  Options when comparing directories are:

     -l   long output format; each text file diff is piped
                                             ----
          through pr(1) to paginate it, other differences are
                  --
          remembered and summarized after all text file differ-
          ences are reported.

     -r   causes application of diff recursively to common sub-
                                ----
          directories encountered.

     -s   causes diff to report files which are the same, which
                 ----
          are otherwise not mentioned.

     -Sname
          starts a directory diff in the middle beginning with
                             ----
          file name.
               ----

     When run on regular files, and when comparing text files
     which differ during directory comparison, diff tells what
                                               ----
     lines must be changed in the files to bring them into agree-
     ment.  Except in rare circumstances, diff finds a smallest
                                          ----
     sufficient set of file differences.  If neither file1 nor
                                                     -----
     file2 is a directory, then either may be given as `-', in
     -----
     which case the standard input is used.  If file1 is a direc-
                                                -----
     tory, then a file in that directory whose file-name is the
     same as the file-name of file2 is used (and vice versa).
                              -----

     There are several options for output format; the default
     output format contains lines of these forms:

          n1 a n3,n4
          --   -- --
          n1,n2 d n3
          -- --   --
          n1,n2 c n3,n4
          -- --   -- --

     These lines resemble ed commands to convert file1 into
                          --                     -----
     file2.  The numbers after the letters pertain to file2.  In
     -----                                            -----
     fact, by exchanging `a' for `d' and reading backward one may
     ascertain equally how to convert file2 into file1.  As in
                                      -----      -----
     ed, identical pairs where n1 = n2 or n3 = n4 are abbreviated
     --                        --   --    --   --
     as a single number.

     Following each of these lines come all the lines that are
     affected in the first file flagged by `<', then all the
     lines that are affected in the second file flagged by `>'.

     Except for -b, which may be given with any of the others,
     the following options are mutually exclusive:

     -e       producing a script of a, c and d commands for the
                                    -  -     -
              editor ed, which will recreate file2 from file1.
                     --                      -----      -----
              In connection with -e, the following shell program
              may help maintain multiple versions of a file.
              Only an ancestral file ($1) and a chain of
              version-to-version ed scripts ($2,$3,...) made by
                                 --
              diff need be on hand.  A `latest version' appears
              ----
              on the standard output.

                      (shift; cat $*; echo '1,$p') | ed - $1

              Extra commands are added to the output when compar-
              ing directories with -e, so that the result is a
              sh(1) script for converting text files which are
              --
              common to the two directories from their state in
              dir1 to their state in dir2.
              ----                   ----

     -f       produces a script similar to that of -e, not useful
              with ed, and in the opposite order.
                   --

     -c       produces a diff with lines of context.  The default
              is to present 3 lines of context and may be
              changed, e.g to 10, by -c10.  With -c the output
              format is modified slightly: the output beginning
              with identification of the files involved and their
              creation dates and then each change is separated by
              a line with a dozen *'s.  The lines removed from
              file1 are marked with `-'; those added to file2 are
              -----                                     -----
              marked `+'.  Lines which are changed from one file
              to the other are marked in both files with `!'.

     -h       does a fast, half-hearted job.  It works only when
              changed stretches are short and well separated, but
              does work on files of unlimited length.

     -Dstring causes diff to create a merged version of file1 and
                     ----                               -----
              file2 on the standard output, with C preprocessor
              -----
              controls included so that a compilation of the
              result without defining string is equivalent to
                                      ------
              compiling file1, while defining string will yield
                        -----                 ------
              file2.
              -----
     -b       causes trailing blanks (spaces and tabs) to be
              ignored, and other strings of blanks to compare
              equal.

FILES
     /tmp/d?????
     /usr/lib/diffh for -h
     /bin/pr

SEE ALSO
     
DIAGNOSTICS
     Exit status is 0 for no differences, 1 for some, 2 for trou-
     ble.

BUGS
     Editing scripts produced under the -e or -f option are naive
     about creating lines consisting of a single `.'.

     When comparing directories with the -b option specified,
     diff first compares the files ala cmp, and then decides to
     ----                              ---
     run the diff algorithm if they are not equal.  This may
             ----
     cause a small amount of spurious output if the files then
     turn out to be identical because the only differences are
     insignificant blank string differences.
!>
!<echo - echo arguments

ECHO(1)             UNIX Programmer's Manual              ECHO(1)

NAME
     echo - echo arguments

SYNOPSIS
     echo [ -n ] [ arg ] ...

DESCRIPTION
     Echo writes its arguments separated by blanks and terminated
     ----
     by a newline on the standard output.  If the flag -n is
     used, no newline is added to the output.

     Echo is useful for producing diagnostics in shell programs
     ----
     and for writing constant data on pipes.  To send diagnostics
     to the standard error file, do `echo ... 1>&2'.
!>
!<ed - text editor

ED(1)               UNIX Programmer's Manual                ED(1)

NAME
     ed - text editor

SYNOPSIS
     ed [ - ] [ -x ] [ name ]

DESCRIPTION
     Ed is the standard text editor.
     --

     If a name argument is given, ed simulates an e command (see
          ----                    --              -
     below) on the named file; that is to say, the file is read
     into ed's buffer so that it can be edited.  If -x is
          -- -
     present, an x command is simulated first to handle an
                 -
     encrypted file.  The optional - suppresses the printing of
     explanatory output and should be used when the standard
     input is an editor script.

     Ed operates on a copy of any file it is editing; changes
     --
     made in the copy have no effect on the file until a w
                                                         -
     (write) command is given.  The copy of the text being edited
     resides in a temporary file called the buffer.
                                            ------

     Commands to ed have a simple and regular structure: zero or
                 --
     more addresses followed by a single character command, pos-
          ---------                                -------
     sibly followed by parameters to the command.  These
     addresses specify one or more lines in the buffer.  Missing
     addresses are supplied by default.

     In general, only one command may appear on a line.  Certain
     commands allow the addition of text to the buffer.  While ed
                                                               --
     is accepting text, it is said to be in input mode. In this
                                            ----- ----
     mode, no commands are recognized; all input is merely col-
     lected.  Input mode is left by typing a period `.' alone at
     the beginning of a line.

     Ed supports a limited form of regular expression notation.
     --                            ------- ----------
     A regular expression specifies a set of strings of charac-
     ters.  A member of this set of strings is said to be matched
                                                          -------
     by the regular expression.  In the following specification
     for regular expressions the word `character' means any char-
     acter but newline.

     1.   Any character except a special character matches
          itself.  Special characters are the regular expression
          delimiter plus \[.  and sometimes ^*$.

     2.   A . matches any character.

     3.   A \ followed by any character except a digit or ()
          matches that character.

     4.   A nonempty string s bracketed [s] (or [^s]) matches any
                            -            -        -
          character in (or not in) s. In s, \ has no special
                                   -     -
          meaning, and ] may only appear as the first letter.  A
          substring a-b, with a and b in ascending ASCII order,
                    - -       -     -
          stands for the inclusive range of ASCII characters.

     5.   A regular expression of form 1-4 followed by * matches
          a sequence of 0 or more matches of the regular expres-
          sion.

     6.   A regular expression, x, of form 1-8, bracketed \(x\)
                                -                           -
          matches what x matches.
                       -

     7.   A \ followed by a digit n matches a copy of the string
                                  -
          that the bracketed regular expression beginning with
          the nth \( matched.
              -

     8.   A regular expression of form 1-8, x, followed by a reg-
                                            -
          ular expression of form 1-7, y matches a match for x
                                       -                     -
          followed by a match for y, with the x match being as
                                  -           -
          long as possible while still permitting a y match.
                                                    -

     9.   A regular expression of form 1-8 preceded by ^ (or fol-
          lowed by $), is constrained to matches that begin at
          the left (or end at the right) end of a line.

     10.  A regular expression of form 1-9 picks out the longest
          among the leftmost matches in a line.

     11.  An empty regular expression stands for a copy of the
          last regular expression encountered.

     Regular expressions are used in addresses to specify lines
     and in one command (see s below) to specify a portion of a
                             -
     line which is to be replaced.  If it is desired to use one
     of the regular expression metacharacters as an ordinary
     character, that character may be preceded by `\'.  This also
     applies to the character bounding the regular expression
     (often `/') and to `\' itself.

     To understand addressing in ed it is necessary to know that
                                 --
     at any time there is a current line. Generally speaking, the
                            ------- ----
     current line is the last line affected by a command; how-
     ever, the exact effect on the current line is discussed
     under the description of the command.  Addresses are con-
     structed as follows.

     1.   The character `.' addresses the current line.

     2.   The character `$' addresses the last line of the
          buffer.

     3.   A decimal number n addresses the n-th line of the
                           -               -
          buffer.

     4.   `'x' addresses the line marked with the name x, which
            -                                          -
          must be a lower-case letter.  Lines are marked with the
          k command described below.
          -

     5.   A regular expression enclosed in slashes `/' addresses
          the line found by searching forward from the current
          line and stopping at the first line containing a string
          that matches the regular expression.  If necessary the
          search wraps around to the beginning of the buffer.

     6.   A regular expression enclosed in queries `?' addresses
          the line found by searching backward from the current
          line and stopping at the first line containing a string
          that matches the regular expression.  If necessary the
          search wraps around to the end of the buffer.

     7.   An address followed by a plus sign `+' or a minus sign
          `-' followed by a decimal number specifies that address
          plus (resp. minus) the indicated number of lines.  The
          plus sign may be omitted.

     8.   If an address begins with `+' or `-' the addition or
          subtraction is taken with respect to the current line;
          e.g. `-5' is understood to mean `.-5'.

     9.   If an address ends with `+' or `-', then 1 is added
          (resp. subtracted).  As a consequence of this rule and
          rule 8, the address `-' refers to the line before the
          current line.  Moreover, trailing `+' and `-' charac-
          ters have cumulative effect, so `--' refers to the
          current line less 2.

     10.  To maintain compatibility with earlier versions of the
          editor, the character `^' in addresses is equivalent to
          `-'.

     Commands may require zero, one, or two addresses.  Commands
     which require no addresses regard the presence of an address
     as an error.  Commands which accept one or two addresses
     assume default addresses when insufficient are given.  If
     more addresses are given than such a command requires, the
     last one or two (depending on what is accepted) are used.

     Addresses are separated from each other typically by a comma
     `,'.  They may also be separated by a semicolon `;'.  In
     this case the current line `.' is set to the previous
     address before the next address is interpreted.  This
     feature can be used to determine the starting line for for-
     ward and backward searches (`/', `?').  The second address
     of any two-address sequence must correspond to a line
     following the line corresponding to the first address.  The
     special form `%' is an abbreviation for the address pair
     `1,$'.

     In the following list of ed commands, the default addresses
                              --
     are shown in parentheses.  The parentheses are not part of
     the address, but are used to show that the given addresses
     are the default.

     As mentioned, it is generally illegal for more than one com-
     mand to appear on a line.  However, most commands may be
     suffixed by `p' or by `l', in which case the current line is
     either printed or listed respectively in the way discussed
     below.  Commands may also be suffixed by `n', meaning the
     output of the command is to be line numbered.  These suf-
     fixes may be combined in any order.

     (.)a
     <text>
     .
          The append command reads the given text and appends it
          after the addressed line.  `.' is left on the last line
          input, if there were any, otherwise at the addressed
          line.  Address `0' is legal for this command; text is
          placed at the beginning of the buffer.

     (., .)c
     <text>
     .
          The change command deletes the addressed lines, then
          accepts input text which replaces these lines.  `.' is
          left at the last line input; if there were none, it is
          left at the line preceding the deleted lines.

     (., .)d
          The delete command deletes the addressed lines from the
          buffer.  The line originally after the last line
          deleted becomes the current line; if the lines deleted
          were originally at the end, the new last line becomes
          the current line.

     e filename
          The edit command causes the entire contents of the
          buffer to be deleted, and then the named file to be
          read in.  `.' is set to the last line of the buffer.
          The number of characters read is typed.  `filename' is
          remembered for possible use as a default file name in a
          subsequent r or w command.  If `filename' is missing,
                     -    -
          the remembered name is used.

     E filename
          This command is the same as e, except that no
                                      -
          diagnostic results when no w has been given since the
                                     -
          last buffer alteration.

     f filename
          The filename command prints the currently remembered
          file name.  If `filename' is given, the currently
          remembered file name is changed to `filename'.

     (1,$)g/regular expression/command list
          In the global command, the first step is to mark every
          line which matches the given regular expression.  Then
          for every such line, the given command list is executed
          with `.' initially set to that line.  A single command
          or the first of multiple commands appears on the same
          line with the global command.  All lines of a multi-
          line list except the last line must be ended with `\'.
          A, i, and c commands and associated input are permit-
          -  -      -
          ted; the `.' terminating input mode may be omitted if
          it would be on the last line of the command list.  The
          commands g and v are not permitted in the command list.
                   -     -

     (.)i

     <text>
     .
          This command inserts the given text before the
          addressed line.  `.' is left at the last line input,
          or, if there were none, at the line before the
          addressed line.  This command differs from the a com-
                                                         -
          mand only in the placement of the text.

     (., .+1)j
          This command joins the addressed lines into a single
          line; intermediate newlines simply disappear.  `.' is
          left at the resulting line.

     ( . )kx
           -
          The mark command marks the addressed line with name x,
                                                              -
          which must be a lower-case letter.  The address form
          `'x' then addresses this line.
            -

     (., .)l
          The list command prints the addressed lines in an unam-
          biguous way: non-graphic characters are printed in
          two-digit octal, and long lines are folded.  The l com-
                                                           -
          mand may be placed on the same line after any non-i/o
          command.

     (., .)ma
            -
          The move command repositions the addressed lines after
          the line addressed by a.  The last of the moved lines
                                -
          becomes the current line.
     (., .)n
          The number command prints the addressed lines with line
          numbers and a tab at the left.

     (., .)p
          The print command prints the addressed lines.  `.' is
          left at the last line printed.  The p command may be
                                              -
          placed on the same line after any non-i/o command.

     (., .)P
          This command is a synonym for p.
                                        -

     q    The quit command causes ed to exit.  No automatic write
                                  --
          of a file is done.

     Q    This command is the same as q, except that no diagnos-
                                      -
          tic results when no w has been given since the last
                              -
          buffer alteration.

     ($)r filename
          The read command reads in the given file after the
          addressed line.  If no file name is given, the remem-
          bered file name, if any, is used (see e and f com-
                                                -     -
          mands).  The file name is remembered if there was no
          remembered file name already.  Address `0' is legal for
          r and causes the file to be read at the beginning of
          -
          the buffer.  If the read is successful, the number of
          characters read is typed.  `.' is left at the last line
          read in from the file.

     ( ., .)s/regular expression/replacement/       or,
     ( ., .)s/regular expression/replacement/g
          The substitute command searches each addressed line for
          an occurrence of the specified regular expression.  On
          each line in which a match is found, all matched
          strings are replaced by the replacement specified, if
          the global replacement indicator `g' appears after the
          command.  If the global indicator does not appear, only
          the first occurrence of the matched string is replaced.
          It is an error for the substitution to fail on all
          addressed lines.  Any punctuation character may be used
          instead of `/' to delimit the regular expression and
          the replacement.  `.' is left at the last line substi-
          tuted.

          An ampersand `&' appearing in the replacement is
          replaced by the string matching the regular expression.
          The special meaning of `&' in this context may be
          suppressed by preceding it by `\'.  The characters `\n'
                                                              --
          where n is a digit, are replaced by the text matched by
                -
          the n-th regular subexpression enclosed between `\('
              -
          and `\)'.  When nested, parenthesized subexpressions
          are present, n is determined by counting occurrences of
                       -
          `\(' starting from the left.

          Lines may be split by substituting new-line characters
          into them.  The new-line in the replacement string must
          be escaped by preceding it by `\'.

          One or two trailing delimiters may be omitted, implying
          the `p' suffix.  The special form `s' followed by no
                                                            --
          delimiters repeats the most recent substitute command
          on the addressed lines.  The `s' may be followed by the
          letters r (use the most recent regular expression for
          the left hand side, instead of the most recent left
          hand side of a substitute command), p (complement the
          setting of the p suffix from the previous substitu-
                         -
          tion), or g (complement the setting of the g suffix).
                                                     -
          These letters may be combined in any order.

     (., .)ta
            -
          This command acts just like the m command, except that
                                          -
          a copy of the addressed lines is placed after address a
                                                                -
          (which may be 0).  `.' is left on the last line of the
          copy.

     (., .)u
          The undo command restores the buffer to it's state
          before the most recent buffer modifying command.  The
          current line is also restored.  Buffer modifying com-
          mands are a, c, d, g, i, k, and v. For purposes of
                    -  -  -  -  -  -      -
          undo, g and v are considered to be a single buffer
                -     -
          modifying command.  Undo is its own inverse.

          When ed runs out of memory (at about 8000 lines on any
               --
          16 bit mini-computer such as the PDP-11) This full undo
          is not possible, and u can only undo the effect of the
                               -
          most recent substitute on the current line.  This res-
          tricted undo also applies to editor scripts when ed is
                                                           --
          invoked with the - option.

     (1, $)v/regular expression/command list
          This command is the same as the global command g except
                                                         -
          that the command list is executed g with `.' initially
                                            -
          set to every line except those matching the regular
                            ------
          expression.

     (1, $)w filename
          The write command writes the addressed lines onto the
          given file.  If the file does not exist, it is created.
          The file name is remembered if there was no remembered
          file name already.  If no file name is given, the
          remembered file name, if any, is used (see e and f com-
                                                     -     -
          mands).  `.' is unchanged.  If the command is
          successful, the number of characters written is
          printed.

     (1, $)W filename
          This command is the same as w, except that the
                                      -
          addressed lines are appended to the file.

     (1, $)wq filename
          This command is the same as w except that afterwards a
                                      -
          q command is done, exiting the editor after the file is
          -
          written.

     x    A key string is demanded from the standard input.
          Later r, e and w commands will encrypt and decrypt the
                -  -     -
          text with this key by the algorithm of crypt(1).  An
                                                 -----
          explicitly empty key turns off encryption.
          (.+1)z    or,
     (.+1)zn
           -
          This command scrolls through the buffer starting at the
          addressed line.  22 (or n, if given) lines are printed.
                                  -
          The last line printed becomes the current line.  The
          value n is sticky, in that it becomes the default for
                -
          future z commands.
                 -

     ($)= The line number of the addressed line is typed.  `.' is
          unchanged by this command.

     !<shell command>
          The remainder of the line after the `!' is sent to
          sh(1) to be interpreted as a command.  `.' is
          --
          unchanged.

     (.+1,.+1)<newline>
          An address alone on a line causes the addressed line to
          be printed.  A blank line alone is equivalent to
          `.+1p'; it is useful for stepping through text.  If two
          addresses are present with no intervening semicolon, ed
                                                               --
          prints the range of lines.  If they are separated by a
          semicolon, the second line is printed.

     If an interrupt signal (ASCII DEL) is sent, ed prints
                                                 --
     `?interrupted' and returns to its command level.

     Some size limitations: 512 characters per line, 256 charac-
     ters per global command list, 64 characters per file name,
     and, on mini computers, 128K characters in the temporary
     file.  The limit on the number of lines depends on the
     amount of core: each line takes 2 words.

     When reading a file, ed discards ASCII NUL characters and
                          --
     all characters after the last newline.  It refuses to read
     files containing non-ASCII characters.
FILES
     /tmp/e*
     edhup: work is saved here if terminal hangs up

SEE ALSO
     B. W. Kernighan, A Tutorial Introduction to the ED Text Edi-
                      - -------- ------------ -- --- -- ---- ----
     tor
     ---
     B. W. Kernighan, Advanced editing on UNIX
                      -------- ------- -- ----
     
DIAGNOSTICS
     `?name' for inaccessible file; `?self-explanatory message'
     for other errors.

     To protect against throwing away valuable work, a q or e
                                                       -    -
     command is considered to be in error, unless a w has
                                                    -
     occurred since the last buffer change.  A second q or e will
                                                      -    -
     be obeyed regardless.

BUGS
     The l command mishandles DEL.
         -
     The undo command causes marks to be lost on affected lines.
         ----
     The x command, -x option, and special treatment of hangups
         -
     only work on UNIX.
!>
!<grep, egrep, fgrep - search a file for a pattern

GREP(1)             UNIX Programmer's Manual              GREP(1)

NAME
     grep, egrep, fgrep - search a file for a pattern

SYNOPSIS
     grep [ option ] ...  expression [ file ] ...

     egrep [ option ] ...  [ expression ] [ file ] ...

     fgrep [ option ] ...  [ strings ] [ file ]

DESCRIPTION
     Commands of the grep family search the input files (standard
                     ----                         -----
     input default) for lines matching a pattern.  Normally, each
     line found is copied to the standard output.  Grep patterns
                                                   ----
     are limited regular expressions in the style of ex(1); it
                                                     --
     uses a compact nondeterministic algorithm.  Egrep patterns
                                                 -----
     are full regular expressions; it uses a fast deterministic
     algorithm that sometimes needs exponential space.  Fgrep
                                                        -----
     patterns are fixed strings; it is fast and compact.  The
     following options are recognized.

     -v   All lines but those matching are printed.

     -x   (Exact) only lines matched in their entirety are
          printed (fgrep only).
                   -----

     -c   Only a count of matching lines is printed.

     -l   The names of files with matching lines are listed
          (once) separated by newlines.

     -n   Each line is preceded by its relative line number in
          the file.

     -b   Each line is preceded by the block number on which it
          was found.  This is sometimes useful in locating disk
          block numbers by context.

     -i   The case of letters is ignored in making comparisons -
          that is, upper and lower case are considered identical.
          This applies to grep and fgrep only.
                          ----     -----

     -s   Silent mode.  Nothing is printed (except error mes-
          sages).  This is useful for checking the error status.

     -w   The expression is searched for as a word (as if sur-
          rounded by `\<' and `\>', see 
                                        --       ----

     -e expression
        ----------
          Same as a simple expression argument, but useful when
                           ----------
          the expression begins with a -.
              ----------
     -f file
        ----
          The regular expression (egrep) or string list (fgrep)
                                  -----                  -----
          is taken from the file.
                            ----

     In all cases the file name is shown if there is more than
     one input file.  Care should be taken when using the charac-
     ters $ * [ ^ | ( ) and \ in the expression as they are also
                                     ----------
     meaningful to the Shell.  It is safest to enclose the entire
     expression argument in single quotes ' '.
     ----------

     Fgrep searches for lines that contain one of the (newline-
     -----
     separated) strings.
                -------

     Egrep accepts extended regular expressions.  In the follow-
     -----
     ing description `character' excludes newline:

          A \ followed by a single character other than newline
          matches that character.

          The character ^ matches the beginning of a line.

          The character $ matches the end of a line.

          A . (period) matches any character.

          A single character not otherwise endowed with special
          meaning matches that character.

          A string enclosed in brackets [] matches any single
          character from the string.  Ranges of ASCII character
          codes may be abbreviated as in `a-z0-9'.  A ] may occur
          only as the first character of the string.  A literal -
          must be placed where it can't be mistaken as a range
          indicator.

          A regular expression followed by an * (asterisk)
          matches a sequence of 0 or more matches of the regular
          expression.  A regular expression followed by a +
          (plus) matches a sequence of 1 or more matches of the
          regular expression.  A regular expression followed by a
          ? (question mark) matches a sequence of 0 or 1 matches
          of the regular expression.

          Two regular expressions concatenated match a match of
          the first followed by a match of the second.

          Two regular expressions separated by | or newline match
          either a match for the first or a match for the second.

          A regular expression enclosed in parentheses matches a
          match for the regular expression.
     The order of precedence of operators at the same parenthesis
     level is [] then *+? then concatenation then | and newline.

     Ideally there should be only one grep, but we don't know a
                                      ----
     single algorithm that spans a wide enough range of space-
     time tradeoffs.

SEE ALSO
     
DIAGNOSTICS
     Exit status is 0 if any matches are found, 1 if none, 2 for
     syntax errors or inaccessible files.

BUGS
     Lines are limited to 256 characters; longer lines are trun-
     cated.
!>
!<head - give first few lines

HEAD(1)             UNIX Programmer's Manual              HEAD(1)

NAME
     head - give first few lines

SYNOPSIS
     head [ -count ] [ file ...  ]

DESCRIPTION
     This filter gives the first count lines of each of the
                                 -----
     specified files, or of the standard input.  If count is
                                                    -----
     omitted it defaults to 10.

SEE ALSO
     tail(1)
!>
!<indent - indent and format C program source

INDENT(1)           UNIX Programmer's Manual            INDENT(1)

NAME
     indent - indent and format C program source

SYNOPSIS
     indent input [ output ] [ flags ]
            -----   ------     -----

DESCRIPTION
     Indent is intended primarily as a C program formatter.
     ------
     Specifically, indent will:
                   ------

     o    indent code lines

     o    align comments

     o    insert spaces around operators where necessary

     o    break up declaration lists as in ``int a,b,c;''.

     Indent will not break up long statements to make them fit
     ------
     within the maximum line length, but it will flag lines that
     are too long.  Lines will be broken so that each statement
     starts a new line, and braces will appear alone on a line.
     (See the -br option to inhibit this.) Also, an attempt is
     made to line up identifiers in declarations.

     The flags which can be specified follow. They may appear
         -----
     before or after the file names.  If the output file is omit-
                                             ------
     ted, the formatted file will be written back into input and
                                                       -----
     a ``backup'' copy of input will be written in the current
                          -----
     directory.  If input is named ``/blah/blah/file'', the
                    -----
     backup file will be named ``.Bfile''.  If output is speci-
                                               ------
     fied, indent checks to make sure it is different from input.
           ------                                          -----

     The following flags may be used to control the formatting
     style imposed by indent.
                      ------

     -lnnn     Maximum length of an output line.  The default is
       ---
               75.

     -cnnn     The column in which comments will start.  The
       ---
               default is 33.

     -cdnnn    The column in which comments on declarations will
        ---
               start.  The default is for these comments to start
               in the same column as other comments.

     -innn     The number of spaces for one indentation level.
       ---
               The default is 4.

     -dj,-ndj  -dj will cause declarations to be left justified.
               -ndj will cause them to be indented the same as
               code.  The default is -ndj.
     -v,-nv    -v turns on ``verbose'' mode, -nv turns it off.
               When in verbose mode, indent will report when it
                                     ------
               splits one line of input into two or more lines of
               output, and it will give some size statistics at
               completion. The default is -nv.

     -bc,-nbc  If -bc is specified, then a newline will be forced
               after each comma in a declaration. -nbc will turn
               off this option.  The default is -bc.

     -dnnn     This option controls the placement of comments
       ---
               which are not to the right of code.  Specifying
               -d2 means that such comments will be placed two
               indentation levels to the left of code.  The
               default -d0 lines up these comments with the code.
               See the section on comment indentation below.

     -br,-bl   Specifying -bl will cause complex statements to be
               lined up like this:
                   if (...)
                   {
                       code
                   }
               Specifying -br (the default) will make them look
               like this:
                   if (...) {
                       code
                   }

     You may set up your own ``profile'' of defaults to indent by
                                                        ------
     creating the file ``.indent.pro'' in your login directory
     and including whatever switches you like.  If indent is run
                                                   ------
     and a profile file exists, then it is read to set up the
     program's defaults.  Switches on the command line, though,
     will always override profile switches.  The profile file
     must be a single line of not more than 127 characters.  The
     switches should be separated on the line by spaces or tabs.

     Multi-line expressions

     Indent will not break up complicated expressions that extend
     ------
     over multiple lines, but it will usually correctly indent
     such expressions which have already been broken up.  Such an
     expression might end up looking like this:
         x =
                 (
                     (Arbitrary parenthesized expression)
                     +
                     (
                         (Parenthesized expression)
                         *
                         (Parenthesized expression)
                     )
                 );

     Comments

     Indent recognizes four kinds of comments. They are: straight
     ------
     text, ``box'' comments, UNIX-style comments, and comments
     that should be passed through unchanged. The action taken
     with these various types are as follows:

     ``Box'' comments.   Indent assumes that any comment with a
       ---   --------    ------
     dash immediately after the start of comment (i.e. ``/*-'')
     is a comment surrounded by a box of stars.  Each line of
     such a comment will be left unchanged, except that the first
     non-blank character of each successive line will be lined up
     with the beginning slash of the first line.  Box comments
     will be indented (see below).

     ``Unix-style'' comments.   This is the type of section
       ---- -----   --------
     header which is used extensively in the UNIX system source.
     If the start of comment (``/*'') appears on a line by
     itself, indent assumes that it is a UNIX-style comment.
     These will be treated similarly to box comments, except the
     first non-blank character on each line will be lined up with
     the `*' of the ``/*''.

     Unchanged comments.   Any comment which starts in column 1
     --------- --------
     will be left completely unchanged.  This is intended pri-
     marily for documentation header pages.  The check for
     unchanged comments is made before the check for UNIX-style
     comments.

     Straight text.   All other comments are treated as straight
     -------- ----
     text. Indent will fit as many words (separated by blanks,
           ------
     tabs, or newlines) on a line as possible.  Straight text
     comments will be indented.

     Comment indentation

     Box, UNIX-style, and straight text comments may be indented.
     If a comment is on a line with code it will be started in
     the ``comment column'', which is set by the -cnnn command
     line parameter.  Otherwise, the comment will be started at
     nnn indentation levels less than where code is currently
     ---
     being placed, where nnn is specified by the -dnnn command
                         ---
     line parameter.  (Indented comments will never be placed in
     column 1.) If the code on a line extends past the comment
     column, the comment will be moved to the next line.

DIAGNOSTICS
     Diagnostic error messages, mostly to tell that a text line
     has been broken or is too long for the output line.

FILES
     .indent.pro    profile file

BUGS
     Does not know how to format ``long'' declarations.
!>
!<join - relational database operator

JOIN(1)             UNIX Programmer's Manual              JOIN(1)

NAME
     join - relational database operator

SYNOPSIS
     join [ options ] file1 file2

DESCRIPTION
     Join forms, on the standard output, a join of the two rela-
     ----
     tions specified by the lines of file1 and file2.  If file1
                                     -----     -----      -----
     is `-', the standard input is used.

     File1 and file2 must be sorted in increasing ASCII collating
     -----     -----
     sequence on the fields on which they are to be joined, nor-
     mally the first in each line.

     There is one line in the output for each pair of lines in
     file1 and file2 that have identical join fields.  The output
     -----     -----
     line normally consists of the common field, then the rest of
     the line from file1, then the rest of the line from file2.
                   -----                                 -----

     Fields are normally separated by blank, tab or newline.  In
     this case, multiple separators count as one, and leading
     separators are discarded.

     These options are recognized:

     -an  In addition to the normal output, produce a line for
       -
          each unpairable line in file n, where n is 1 or 2.
                                       -        -

     -e s Replace empty output fields by string s.
        -                                       -

     -jn m
       - -
          Join on the mth field of file n.  If n is missing, use
                      -                 -      -
          the mth field in each file.
              -

     -o list
        ----
          Each output line comprises the fields specified in
          list, each element of which has the form n.m, where n
          ----                                     - -        -
          is a file number and m is a field number.
                               -

     -tc  Use character c as a separator (tab character).  Every
       -                -
          appearance of c in a line is significant.
                        -

SEE ALSO
     
BUGS
     With default field separation, the collating sequence is
     that of sort -b; with -t, the sequence is that of a plain
             ----  -
     sort.
     The conventions of join, sort, comm, uniq, look and awk(1)
                        ----  ----  ----  ----  ----     ---
     are wildly incongruous.
!>
!<lex - lexical analysis program generator

LEX(1)                   USER COMMANDS                     LEX(1)



NAME
     lex - lexical analysis program generator

SYNOPSIS
     lex [ -fntv ] [ filename ] ...
                     --------

DESCRIPTION
     lex generates programs to be used in simple lexical analysis
     of text.  Each filename (the standard input by default) con-
                    --------
     tains regular expressions to search for, and actions written
     in C to be executed when expressions are found.

     A C source program, lex.yy.c is generated, to be compiled as
     follows:

          cc lex.yy.c cutils:libln.a

     This program, when run, copies unrecognized portions of  the
     input  to  the  output, and executes the associated C action
     for each regular expression that is recognized.  The  actual
     string  matched  is  left  in  yytext, an external character
     array.

     Matching is done in order of the strings in the  file.   The
     strings  may  contain  square  braces  to indicate character
     classes, as in [abx-z] to indicate a, b, x, y,  and  z;  and
     the operators *, + and ?, which mean, respectively, any non-
     negative number, any positive number, or either zero or  one
     occurrences  of  the  previous character or character-class.
     The dot character (`.') is the class of all ASCII characters
     except NEWLINE.

     Parentheses for grouping and vertical  bar  for  alternation
     are also supported.  The notation r{d,e} in a rule indicates
                                       - - -
     instances of regular expression r between d and e.  It has a
                                     -         -     -
     higher precedence than |, but lower than that of *, ?, +, or
     concatenation.  The ^ (carat character) at the beginning  of
     an  expression  permits  a successful match only immediately
     after a NEWLINE, and the  $  character  at  the  end  of  an
     expression requires a trailing NEWLINE.

     The / character in an expression indicates trailing context;
     only  the part of the expression up to the slash is returned
     in yytext, although the remainder  of  the  expression  must
        ------
     follow in the input stream.

     An operator character may be used as an ordinary  symbol  if
     it is within `"' symbols or preceded by `\'.

     Three subroutines defined as macros are expected: input() to
     read  a character; unput(c) to replace a character read; and
                              -
     output(c) to place an output character.  They are defined in
            -
     terms  of  the  standard streams, but you can override them.
     The program generated is named yylex(), and the library con-
     tains  a  main()  which  calls it.  The action REJECT on the
     right side of the rule rejects this match and  executes  the
     next suitable match; the function yymore() accumulates addi-
     tional characters into the same  yytext;  and  the  function
     yyless(p)  pushes  back  the  portion  of the string matched
            -
     beginning  at  p,  which  should  be  between   yytext   and
                    -
     yytext+yyleng.   The  macros input and output use files yyin
                                  -----     ------
     and yyout to read from and write to, defaulted to stdin  and
     stdout, respectively.

     In a lex program, any line beginning with a blank is assumed
     to  contain  only C text and is copied; if it precedes %% it
     is copied into the external definition area of the  lex.yy.c
     file.   All  rules  should  follow  a  %%, as in YACC. Lines
     preceding %% which begin with a  nonblank  character  define
     the  string  on the left to be the remainder of the line; it
     can be used later by surrounding it with  {}.   Note:  curly
     brackets  do not imply parentheses; only string substitution
     is done.

     The external names generated by lex all begin with the  pre-
     fix yy or YY.

     Certain table sizes for the resulting  finite-state  machine
     can be set in the definitions section:

          %p n number of positions is n (default 2000)
             -                        -

          %n n number of states is n (500)
             -                     -

          %t n number of parse tree nodes is n (1000)
             -                               -

          %a n number of transitions is n (3000)
             -                          -

     The use of one or more of the  above  automatically  implies
     the -v option, unless the -n option is used.

OPTIONS
     -f   Faster compilation. Do not bother to pack the resulting
          tables; limited to small programs.

     -n   Opposite of -v; -n is default.

     -t   Place the result on the standard output instead  of  in
          file lex.yy.c.

     -v   Print a one-line summary of statistics of the generated
          analyzer.

EXAMPLES
     The following command line:
          lex lexcommands

     would draw lex instructions from the file  lexcommands,  and
     place the output in lex.yy.c.

     The following:

          %% [A-Z]     putchar (yytext[0]+'a'-'A'); [ ]+$     ; [
          ]+ putchar(' ');

     is an example of a lex program.  It converts upper  case  to
     lower, removes blanks at the end of lines, and replaces mul-
     tiple blanks by single blanks.

          D       [0-9]
          %%
          if      printf("IF statement\n");
          [a-z]+  printf("tag, value %s\n",yytext);
          0{D}+   printf("octal number %s\n",yytext);
          {D}+    printf("decimal number %s\n",yytext);
          "++"    printf("unary op\n");
          "+"     printf("binary op\n");
          "/*"    {       loop:
                          while (input() != '*');
                          switch (input())
                                  {
                                  case '/': break;
                                  case '*': unput('*');
                                  default: go to loop;
                                  }
                          }

FILES
     lex.yy.c - resulting C program
     cutils:libln.a - ar(1) library of routines to link with lex.yy.mob
     cutils:ncform - lex driver for C programs
     cutils:nrform - lex driver for Ratfor programs

SEE ALSO
     sed(1V), yacc(1)

     Programming Utilities and Libraries
     ----------- --------- --- ---------
!>
!<make - maintain program groups

MAKE(1)             UNIX Programmer's Manual              MAKE(1)

NAME
     make - maintain program groups

SYNOPSIS
     make [ -f makefile ] [ option ] ...  file ...

DESCRIPTION
     Make executes commands in makefile to update one or more
     ----                      --------
     target names.  Name is typically a program.  If no -f option
            -----   ----
     is present, `makefile' and `Makefile' are tried in order.
     If makefile is `-', the standard input is taken.  More than
        --------
     one -f option may appear

     Make updates a target if it depends on prerequisite files
     ----
     that have been modified since the target was last modified,
     or if the target does not exist.

     Makefile contains a sequence of entries that specify depen-
     --------
     dencies.  The first line of an entry is a blank-separated
     list of targets, then a colon, then a list of prerequisite
     files.  Text following a semicolon, and all following lines
     that begin with a tab, are shell commands to be executed to
     update the target.  If a name appears on the left of more
     than one `colon' line, then it depends on all of the names
     on the right of the colon on those lines, but only one com-
     mand sequence may be specified for it.  If a name appears on
     a line with a double colon :: then the command sequence fol-
     lowing that line is performed only if the name is out of
     date with respect to the names to the right of the double
     colon, and is not affected by other double colon lines on
     which that name may appear.

     Two special forms of a name are recognized.  A name like
     a(b) means the file named b stored in the archive named a. A
     - -                       -                             -
     name like a((b)) means the file stored in archive a contain-
               -  -                                    -
     ing the entry point b.
                         -

     Sharp and newline surround comments.

     The following makefile says that `pgm' depends on two files
     `a.o' and `b.o', and that they in turn depend on `.c' files
     and a common file `incl'.

          pgm: a.o b.o
               cc a.o b.o -lm -o pgm
          a.o: incl a.c
               cc -c a.c
          b.o: incl b.c
               cc -c b.c

     Makefile entries of the form
     --------
          string1 = string2

     are macro definitions.  Subsequent appearances of $(string1)
                                                         -------
     or ${string1} are replaced by string2.  If string1 is a sin-
          -------                  -------      -------
     gle character, the parentheses or braces are optional.

     Make infers prerequisites for files for which makefile gives
     ----                                          --------
     no construction commands.  For example, a `.c' file may be
     inferred as prerequisite for a `.o' file and be compiled to
     produce the `.o' file.  Thus the preceding example can be
     done more briefly:

          pgm: a.o b.o
               cc a.o b.o -lm -o pgm
          a.o b.o: incl

     Prerequisites are inferred according to selected suffixes
     listed as the `prerequisites' for the special name `.SUF-
     FIXES'; multiple lists accumulate; an empty list clears what
     came before.  Order is significant; the first possible name
     for which both a file and a rule as described in the next
     paragraph exist is inferred.  The default list is

          .SUFFIXES: .out .o .c .e .r .f .y .l .s .p

     The rule to create a file with suffix s2 that depends on a
                                           --
     similarly named file with suffix s1 is specified as an entry
                                      --
     for the `target' s1s2.  In such an entry, the special macro
                      ----
     $* stands for the target name with suffix deleted, $@ for
     the full target name, $< for the complete list of prere-
     quisites, and $? for the list of prerequisites that are out
     of date.  For example, a rule for making optimized `.o'
     files from `.c' files is

          .c.o: ; cc -c -O -o $@ $*.c

     Certain macros are used by the default inference rules to
     communicate optional arguments to any resulting compila-
     tions.  In particular, `CFLAGS' is used for cc(1) options,
                                                 --
     `FFLAGS' for f77(1) options, `PFLAGS' for pc(1) options, and
                  ---                          --
     `LFLAGS' and `YFLAGS' for lex and yacc(1) options.  In addi-
                               ---     ----
     tion, the macro `MFLAGS' is filled in with the initial com-
     mand line options supplied to make.  This simplifies main-
                                   ----
     taining a hierarchy of makefiles as one may then invoke make
                                                             ----
     on makefiles in subdirectories and pass along useful options
     such as -k.

     Command lines are executed one at a time, each by its own
     shell.  A line is printed when it is executed unless the
     special target `.SILENT' is in makefile, or the first char-
                                    --------
     acter of the command is `@'.
     Commands returning nonzero status (see 
 cause make
                                            -----           ----
     to terminate unless the special target `.IGNORE' is in
     makefile or the command begins with <tab><hyphen>.
     --------

     Interrupt and quit cause the target to be deleted unless the
     target is a directory or depends on the special name `.PRE-
     CIOUS'.

     Other options:

     -i   Equivalent to the special entry `.IGNORE:'.

     -k   When a command returns nonzero status, abandon work on
          the current entry, but continue on branches that do not
          depend on the current entry.

     -n   Trace and print, but do not execute the commands needed
          to update the targets.

     -t   Touch, i.e. update the modified date of targets,
          without executing any commands.

     -r   Equivalent to an initial special entry `.SUFFIXES:'
          with no list.

     -s   Equivalent to the special entry `.SILENT:'.

FILES
     makefile, Makefile

SEE ALSO
     
     S. I. Feldman Make - A Program for Maintaining Computer Pro-
                   ----   - ------- --- ----------- -------- ----
     grams
     -----

BUGS
     Some commands return nonzero status inappropriately.  Use -i
     to overcome the difficulty.
     Commands that are directly executed by the shell, notably
     cd(1), are ineffectual across newlines in make.
     --                                        ----
!>
!<pr - print file

PR(1)               UNIX Programmer's Manual                PR(1)

NAME
     pr - print file

SYNOPSIS
     pr [ option ] ...  [ file ] ...

DESCRIPTION
     Pr produces a printed listing of one or more files. The out-
     --                                           -----
     put is separated into pages headed by a date, the name of
     the file or a specified header, and the page number.  If
     there are no file arguments, pr prints its standard input.
                                  --

     Options apply to all following files but may be reset
     between files:

     -n   Produce n-column output.
      -           -

     +n   Begin printing with page n.
      -                            -

     -h   Take the next argument as a page header.

     -wn  For purposes of multi-column output, take the width of
       -
          the page to be n characters instead of the default 72.
                         -

     -f   Use formfeeds instead of newlines to separate pages.  A
          formfeed is assumed to use up two blank lines at the
          top of a page.  (Thus this option does not affect the
          effective page length.)

     -ln  Take the length of the page to be n lines instead of
       -                                    -
          the default 66.

     -t   Do not print the 5-line header or the 5-line trailer
          normally supplied for each page.

     -sc  Separate columns by the single character c instead of
       -                                           -
          by the appropriate amount of white space.  A missing c
                                                               -
          is taken to be a tab.

     -m   Print all files simultaneously, each in one column,
                    -----

     Inter-terminal messages via write(1) are forbidden during a
                                 -----
     pr.
     --

FILES
     /dev/tty?  to suspend messages.

SEE ALSO
     cat(1)

DIAGNOSTICS
     There are no diagnostics when pr is printing on a terminal.
                                   --
!>
!<rev - reverse lines of a file

REV(1)              UNIX Programmer's Manual               REV(1)

NAME
     rev - reverse lines of a file

SYNOPSIS
     rev [ file ] ...

DESCRIPTION
     Rev copies the named files to the standard output, reversing
     ---
     the order of characters in every line.  If no file is speci-
     fied, the standard input is copied.
!>
!<rm, rmdir  - remove (unlink) files or directories

RM(1)               UNIX Programmer's Manual                RM(1)

NAME
     rm, rmdir  - remove (unlink) files or directories

SYNOPSIS
     rm [ -f ] [ -r ] [ -i ] [ - ] file ...

     rmdir dir ...

DESCRIPTION
     Rm removes the entries for one or more files from a direc-
     --
     tory.  If an entry was the last link to the file, the file
     is destroyed.  Removal of a file requires write permission
     in its directory, but neither read nor write permission on
     the file itself.

     If a file has no write permission and the standard input is
     a terminal, its permissions are printed and a line is read
     from the standard input.  If that line begins with `y' the
     file is deleted, otherwise the file remains.  No questions
     are asked and no errors are reported when the -f (force)
     option is given.

     If a designated file is a directory, an error comment is
     printed unless the optional argument -r has been used.  In
     that case, rm recursively deletes the entire contents of the
                --
     specified directory, and the directory itself.

     If the -i (interactive) option is in effect, rm asks whether
                                                  --
     to delete each file, and, under -r, whether to examine each
     directory.

     The null option - indicates that all the arguments following
     it are to be treated as file names.  This allows the specif-
     ication of file names starting with a minus.

     Rmdir removes entries for the named directories, which must
     -----
     be empty.

SEE ALSO
     
!>
!<sort - sort or merge files

SORT(1)             UNIX Programmer's Manual              SORT(1)

NAME
     sort - sort or merge files

SYNOPSIS
     sort [ -mubdfinrtx ] [ +pos1  [ -pos2 ] ] ...  [ -o name ] [
             ---------       ----     ----
     -T directory ] [ name ] ...

DESCRIPTION
     Sort sorts lines of all the named files together and writes
     ----
     the result on the standard output.  The name `-' means the
     standard input.  If no input files are named, the standard
     input is sorted.

     The default sort key is an entire line.  Default ordering is
     lexicographic by bytes in machine collating sequence.  The
     ordering is affected globally by the following options, one
     or more of which may appear.

     b    Ignore leading blanks (spaces and tabs) in field com-
          parisons.

     d    `Dictionary' order: only letters, digits and blanks are
          significant in comparisons.

     f    Fold upper case letters onto lower case.

     i    Ignore characters outside the ASCII range 040-0176 in
          nonnumeric comparisons.

     n    An initial numeric string, consisting of optional
          blanks, optional minus sign, and zero or more digits
          with optional decimal point, is sorted by arithmetic
          value.  Option n implies option b.

     r    Reverse the sense of comparisons.

     tx   `Tab character' separating fields is x.
      -                                        -

     The notation +pos1 -pos2 restricts a sort key to a field
                   ----  ----
     beginning at pos1 and ending just before pos2.  Pos1 and
                  ----                        ----   ----
     pos2 each have the form m.n, optionally followed by one or
     ----                    - -
     more of the flags bdfinr, where m tells a number of fields
                                     -
     to skip from the beginning of the line and n tells a number
                                                -
     of characters to skip further.  If any flags are present
     they override all the global ordering options for this key.
     If the b option is in effect n is counted from the first
                                  -
     nonblank in the field; b is attached independently to pos2.
                                                           ----
     A missing .n means .0; a missing -pos2 means the end of the
                -                      ----
     line.  Under the -tx option, fields are strings separated by
                        -
     x; otherwise fields are nonempty nonblank strings separated
     -
     by blanks.
     When there are multiple sort keys, later keys are compared
     only after all earlier keys compare equal.  Lines that oth-
     erwise compare equal are ordered with all bytes significant.

     These option arguments are also understood:

     c    Check that the input file is sorted according to the
          ordering rules; give no output unless the file is out
          of sort.

     m    Merge only, the input files are already sorted.

     o    The next argument is the name of an output file to use
          instead of the standard output.  This file may be the
          same as one of the inputs.

     T    The next argument is the name of a directory in which
          temporary files should be made.

     u    Suppress all but one in each set of equal lines.
          Ignored bytes and bytes outside keys do not participate
          in this comparison.

EXAMPLES
     Print in alphabetical order all the unique spellings in a
     list of words.  Capitalized words differ from uncapitalized.

             sort -u +0f +0 list

     Print the password file (
 sorted by user id number
                              ------
     (the 3rd colon-separated field).

             sort -t: +2n /etc/passwd

     Print the first instance of each month in an already sorted
     file of (month day) entries.  The options -um with just one
     input file make the choice of a unique representative from a
     set of equal lines predictable.

             sort -um +0 -1 dates

FILES
     /usr/tmp/stm*, /tmp/*    first and second tries for tem-
     porary files

SEE ALSO
     
DIAGNOSTICS
     Comments and exits with nonzero status for various trouble
     conditions and for disorder discovered under option -c.
BUGS
     Very long lines are silently truncated.
!>
!<spline - interpolate smooth curve

SPLINE(1G)          UNIX Programmer's Manual           SPLINE(1G)

NAME
     spline - interpolate smooth curve

SYNOPSIS
     spline [ option ] ...

DESCRIPTION
     Spline takes pairs of numbers from the standard input as
     ------
     abcissas and ordinates of a function.  It produces a similar
     set, which is approximately equally spaced and includes the
     input set, on the standard output.  The cubic spline output
     (R. W. Hamming, Numerical Methods for Scientists and
                     --------- ------- --- ---------- ---
     Engineers, 2nd ed., 349ff) has two continuous derivatives,
     ---------
     and sufficiently many points to look smooth when plotted,
     for example by graph(1G).
                    -----

     The following options are recognized, each as a separate
     argument.

     -a   Supply abscissas automatically (they are missing from
          the input); spacing is given by the next argument, or
          is assumed to be 1 if next argument is not a number.

     -k   The constant k used in the boundary value computation
                       -

             (2nd deriv. at end) = k*(2nd deriv. next to end)

          is set by the next argument.  By default k = 0.
                                                   -

     -n   Space output points so that approximately n intervals
                                                    -
          occur between the lower and upper x limits.  (Default n
                                            -                   -
          = 100.)

     -p   Make output periodic, i.e. match derivatives at ends.
          First and last input values should normally agree.

     -x   Next 1 (or 2) arguments are lower (and upper) x limits.
                                                        -
          Normally these limits are calculated from the data.
          Automatic abcissas start at lower limit (default 0).

SEE ALSO
     
DIAGNOSTICS
     When data is not strictly monotone in x, spline reproduces
                                           -  ------
     the input without interpolating extra points.

BUGS
     A limit of 1000 input points is enforced silently.
!>
!<split - split a file into pieces

SPLIT(1)            UNIX Programmer's Manual             SPLIT(1)

NAME
     split - split a file into pieces

SYNOPSIS
     split [ -n ] [ file [ name ] ]
              -

DESCRIPTION
     Split reads file and writes it in n-line pieces (default
     -----       ----                  -
     1000), as many as necessary, onto a set of output files.
     The name of the first output file is name with aa appended,
                                          ----
     and so on lexicographically.  If no output name is given, x
     is default.

     If no input file is given, or if - is given in its stead,
     then the standard input file is used.
!>
!<sum - sum and count blocks in a file

SUM(1)              UNIX Programmer's Manual               SUM(1)

NAME
     sum - sum and count blocks in a file

SYNOPSIS
     sum file

DESCRIPTION
     Sum calculates and prints a 16-bit checksum for the named
     ---
     file, and also prints the number of blocks in the file.  It
     is typically used to look for bad spots, or to validate a
     file communicated over some transmission line.

SEE ALSO
     wc(1)

DIAGNOSTICS
     `Read error' is indistinguishable from end of file on most
     devices; check the block count.
!>
!<tail - deliver the last part of a file

TAIL(1)             UNIX Programmer's Manual              TAIL(1)

NAME
     tail - deliver the last part of a file

SYNOPSIS
     tail +number[lbc][rf] [ file ]
          -       ---  --

DESCRIPTION
     Tail copies the named file to the standard output beginning
     ----
     at a designated place.  If no file is named, the standard
     input is used.

     Copying begins at distance +number from the beginning, or
                                 ------
     -number from the end of the input.  Number is counted in
      ------                             ------
     units of lines, blocks or characters, according to the
     appended option l, b or c. When no units are specified,
     counting is by lines.

     Specifying r causes tail to print lines from the end of the
     file in reverse order.  The default for r is to print the
     entire file this way.  Specifying f causes tail to not quit
                                                ----
     at end of file, but rather wait and try to read repeatedly
     in hopes that the file will grow.

SEE ALSO
     dd(1)

BUGS
     Tails relative to the end of the file are treasured up in a
     buffer, and thus are limited in length.

     Various kinds of anomalous behavior may happen with charac-
     ter special files.
!>
!<tr - translate characters

TR(1)               UNIX Programmer's Manual                TR(1)

NAME
     tr - translate characters

SYNOPSIS
     tr [ -cds ] [ string1 [ string2 ] ]

DESCRIPTION
     Tr copies the standard input to the standard output with
     --
     substitution or deletion of selected characters.  Input
     characters found in string1 are mapped into the correspond-
                         -------
     ing characters of string2.  When string2 is short it is pad-
                       -------        -------
     ded to the length of string1 by duplicating its last charac-
                          -------
     ter.  Any combination of the options -cds may be used: -c
     complements the set of characters in string1 with respect to
                                          -------
     the universe of characters whose ASCII codes are 01 through
     0377 octal; -d deletes all input characters in string1; -s
                                                    -------
     squeezes all strings of repeated output characters that are
     in string2 to single characters.
        -------

     In either string the notation a-b means a range of charac-
                                   - -
     ters from a to b in increasing ASCII order.  The character
               -    -
     `\' followed by 1, 2 or 3 octal digits stands for the char-
     acter whose ASCII code is given by those digits.  A `\' fol-
     lowed by any other character stands for that character.

     The following example creates a list of all the words in
     `file1' one per line in `file2', where a word is taken to be
     a maximal string of alphabetics.  The second string is
     quoted to protect `\' from the Shell.  012 is the ASCII code
     for newline.

          tr -cs A-Za-z '\012' <file1 >file2

SEE ALSO
     
BUGS
     Won't handle ASCII NUL in string1 or string2; always deletes
                               -------    -------
     NUL from input.
!>
!<tsort - topological sort

TSORT(1)            UNIX Programmer's Manual             TSORT(1)

NAME
     tsort - topological sort

SYNOPSIS
     tsort [ file ]

DESCRIPTION
     Tsort produces on the standard output a totally ordered list
     -----
     of items consistent with a partial ordering of items men-
     tioned in the input file.  If no file is specified, the
                         ----         ----
     standard input is understood.

     The input consists of pairs of items (nonempty strings)
     separated by blanks.  Pairs of different items indicate ord-
     ering.  Pairs of identical items indicate presence, but not
     ordering.

SEE ALSO
     lorder(1)

DIAGNOSTICS
     Odd data: there is an odd number of fields in the input
     file.

BUGS
     Uses a quadratic algorithm; not worth fixing for the typical
     use of ordering a library archive file.
!>
!<uniq - report repeated lines in a file

UNIQ(1)             UNIX Programmer's Manual              UNIQ(1)

NAME
     uniq - report repeated lines in a file

SYNOPSIS
     uniq [ -udc [ +n ] [ -n ] ] [ input [ output ] ]

DESCRIPTION
     Uniq reads the input file comparing adjacent lines.  In the
     ----
     normal case, the second and succeeding copies of repeated
     lines are removed; the remainder is written on the output
     file.  Note that repeated lines must be adjacent in order to
     be found; see sort(1).  If the -u flag is used, just the
                   ----
     lines that are not repeated in the original file are output.
     The -d option specifies that one copy of just the repeated
     lines is to be written.  The normal mode output is the union
     of the -u and -d mode outputs.

     The -c option supersedes -u and -d and generates an output
     report in default style but with each line preceded by a
     count of the number of times it occurred.

     The n arguments specify skipping an initial portion of each
         -
     line in the comparison:

     -n      The first n fields together with any blanks before
      -                -
             each are ignored.  A field is defined as a string of
             non-space, non-tab characters separated by tabs and
             spaces from its neighbors.

     +n      The first n characters are ignored.  Fields are
      -                -
             skipped before characters.

SEE ALSO
     
!>
!<units - conversion program

UNITS(1)            UNIX Programmer's Manual             UNITS(1)

NAME
     units - conversion program

SYNOPSIS
     units

DESCRIPTION
     Units converts quantities expressed in various standard
     -----
     scales to their equivalents in other scales.  It works
     interactively in this fashion:

          You have: inch
          --- ----
          You want: cm
          --- ----
               * 2.54000e+00
                 - ------ --
               / 3.93701e-01
                 - ------ --

     A quantity is specified as a multiplicative combination of
     units optionally preceded by a numeric multiplier.  Powers
     are indicated by suffixed positive integers, division by the
     usual sign:

          You have: 15 pounds force/in2
          --- ----
          You want: atm
          --- ----
               * 1.02069e+00
                 - ------ --
               / 9.79730e-01
                 - ------ --

     Units only does multiplicative scale changes.  Thus it can
     -----
     convert Kelvin to Rankine, but not Centigrade to Fahrenheit.
     Most familiar units, abbreviations, and metric prefixes are
     recognized, together with a generous leavening of exotica
     and a few constants of nature including:

          pi   ratio of circumference to diameter
          c    speed of light
          e    charge on an electron
          g    acceleration of gravity
          force     same as g
          mole Avogadro's number
          water     pressure head per unit height of water
          au   astronomical unit

     `Pound' is a unit of mass.  Compound names are run together,
     e.g. `lightyear'.  British units that differ from their US
     counterparts are prefixed thus: `brgallon'.  Currency is
     denoted `belgiumfranc', `britainpound', ...

     For a complete list of units, `cat /usr/lib/units'.

FILES
     /usr/lib/units
BUGS
     Don't base your financial plans on the currency conversions.
!>
!<uuencode,uudecode - encode/decode a binary file for

UUENCODE(1C)        UNIX Programmer's Manual         UUENCODE(1C)

NAME
     uuencode,uudecode - encode/decode a binary file for
     transmission via mail

SYNOPSIS
     uuencode [ source ] remotedest | mail sys1!sys2!..!decode
     uudecode [ file ]

DESCRIPTION
     Uuencode and uudecode are used to send a binary file via
     --------     --------
     uucp (or other) mail.  This combination can be used over
     indirect mail links even when uusend(1C) is not available.
                                   ------

     Uuencode takes the named source file (default standard
     --------
     input) and produces an encoded version on the standard out-
     put.  The encoding uses only printing ASCII characters, and
     includes the mode of the file and the remotedest for recrea-
                                           ----------
     tion on the remote system.

     Uudecode reads an encoded file, strips off any leading and
     --------
     trailing lines added by mailers, and recreates the original
     file with the specified mode and name.

     The intent is that all mail to the user ``decode'' should be
     filtered through the uudecode program.  This way the file is
     created automatically without human intervention.  This is
     possible on the uucp network by either using sendmail or by
                                                  --------
     making rmail be a link to Mail instead of mail. In each
            -----              ----            ----
     case, an alias must be created in a master file to get the
     automatic invocation of uudecode.

     If these facilities are not available, the file can be sent
     to a user on the remote machine who can uudecode it manu-
     ally.

     The encode file has an ordinary text form and can be edited
     by any text editor to change the mode or remote name.

SEE ALSO
     
AUTHOR
     Mark Horton

BUGS
     The file is expanded by 35% (3 bytes become 4 plus control
     information) causing it to take longer to transmit.

     The user on the remote system who is invoking uudecode
                                                   --------
     (often uucp) must have write permission on the specified
            ----
     file.
!>
!<wc - word count

WC(1)               UNIX Programmer's Manual                WC(1)

NAME
     wc - word count

SYNOPSIS
     wc [ -lwc ] [ name ... ]

DESCRIPTION
     Wc counts lines, words and characters in the named files, or
     --
     in the standard input if no name appears.  A word is a maxi-
     mal string of characters delimited by spaces, tabs or new-
     lines.

     If an argument beginning with one of ``lwc'' is present, the
     specified counts (lines, words, or characters) are selected
     by the letters l, w, or c.  The default is -lwc.

BUGS
!>
!<yacc - yet another compiler-compiler: parsing program generator

YACC(1)                  USER COMMANDS                    YACC(1)



NAME
     yacc - yet another compiler-compiler: parsing  program  gen-
     erator

SYNOPSIS
     yacc [ -dv ] grammar
                  -------

DESCRIPTION
     yacc converts a context-free grammar into a  set  of  tables
     for a simple automaton which executes an LR(1) parsing algo-
     rithm.  The grammar may be ambiguous, in which  case  speci-
     fied  precedence  rules  may be used to break those ambigui-
     ties.

     The output file, y.tab.c, must be compiled by the C compiler
     to  produce a function named yyparse().  The yyparse() func-
     tion must be loaded with the lexical  analyzer  yylex(),  as
     well  as  main()  and  the error handling routine yyerror().
     These routines must be supplied by the user; lex(1) is  use-
     ful  for  creating lexical analyzers usable by yacc-produced
     parsers.

OPTIONS
     -d   Generate the file y.tab.h with  the  define  statements
          that  associate  the yacc-assigned token codes with the
          user-declared token names so that  source  files  other
          than y.tab.c can access the token codes.

     -v   Prepare the file y.output containing a  description  of
          the  parsing tables and a report on conflicts generated
          by ambiguities in the grammar.

FILES
     y.output            description of parsing tables  and  con-
                         flict report
     y.tab.c             output parser
     y.tab.h             defines for token names
     yacc.tmp, yacc.acts temporary files
     cutils:yaccpar    parser prototype for C programs

SEE ALSO
     lex(1)

     Programming Utilities and Libraries
     ----------- --------- --- ---------
     LR Parsing by A. V. Aho and S. C.  Johnson,  Computing  Sur-
     -- -------
     veys, June, 1974

DIAGNOSTICS
     The number of reduce-reduce and  shift-reduce  conflicts  is
     reported  on  the standard output; a more detailed report is
     found in the y.output file.  Similarly, it is also  reported
     if some rules are not reachable from the start symbol.

BUGS
     Because file names are fixed, no more than one yacc  process
     should be active in a given directory at a time.

     The APM version fails to delete one of its temporary files,
     instead leaving it around with the name "$$$.......". The clean
                                                               -----
     utility can be used to dispose of this.
!>
