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

Contents:


Usage Top || Next

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

See Understanding The Usage Section for details.


Description Top || Previous || Next

tand prints, to outfile, all rows in infile2 that also appear in infile; i.e. the intersection of the tables in infile and infile2.

infile and infile2 are ASCII text files. tand 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.

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

tand does not print duplicate rows from infile2.

tand ignores empty (whitespace only) input lines.

tand prints rows in their original relative order.

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

tand holds infile in memory while processing infile2, so you may want to specify the smaller input file first (i.e. as infile).


Example Top || Previous || Next

Consider the file "scooby" which contains:

      peter 18
      paul   74
      mary  9
      frank  40

and the file "doo" which contains:

      tom  100
      mary  9
      al   77
      frank 17
      peter   18

The command:

      tand scooby and doo

writes, to the screen, the rows that are common to the two files:

      mary    9
      peter   18


Options Top || Previous || Next

tand recognizes the following command line options:


Limitations Top || Previous || Next

tand runs out of memory if infile is too large.

See also TextTools General Features.


Return Codes Top || Previous || Next

tand 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 tand:

End of document