TSUB v2.10 - subtraction of two data tables
Documentation revised 21 Oct 00 - Copyright (c) 1996-2000 by Rune Berg. TextTools Freeware.

Contents:


Usage Top || Next

tsub [log logfile] [options] [infile] and infile2 [to outfile]

See Understanding The Usage Section for details.


Description Top || Previous || Next

tsub prints, to outfile, all rows in infile that do not appear in infile2; i.e. infile 'minus' infile2.

infile and infile2 are ASCII text files. tsub sees each input line as a row of (by default, but see options) whitespace-separated fields; this is described in more detail in the documentation for tcols.

tsub compares rows field by field according to the following rules:

All printed rows are from infile, in the original order.

tsub ignores empty (whitespace only) input lines.

If you don't specify infile, tsub reads from standard input.
If you don't specify outfile, tsub writes to standard output.
If you don't specify logfile, tsub writes error messages to standard error.

tsub holds the contents of infile2 in memory while processing infile.


Example Top || Previous || Next

Consider the file "scooby" which contains:

      tom  100
      mary  9
      al   77
      frank 17
      peter   18

and the file "doo" which contains:

      peter 18
      paul   74
      mary  9
      frank  40

The command:

      tsub scooby and doo

writes, to the screen, the rows that are unique to "doo":

      tom   100
      al    77
      frank 17


Options Top || Previous || Next

tsub recognizes the following command line options:


Limitations Top || Previous || Next

tsub runs out of memory if infile2 is too large.

See also TextTools General Features.


Return Codes Top || Previous || Next

tsub returns with one of the following codes ("error levels"):

For more details, see TextTools General Features.


Version History Top || Previous

These are the released versions of tsub:

End of document