TAND v2.00 - intersect two data tables
Revised 2-Jan-99. Copyright (c) 1996-99 by Rune Berg. TextTools Freeware.

Usage | Description | Example | Options | Limitations | Return Codes | Version History | tt_r6


UsageTop | Next

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


DescriptionTop | Previous | Next

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

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

tand does not print duplicate rows.

tand ignores empty (whitespace only) input lines.

tand compares fields the same way as trows does.

If you don't specify infile1, 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 infile1 in memory while processing infile2, so you may want to specify the smaller input file first (i.e. as infile1).


ExampleTop | 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


OptionsTop | Previous | Next

tand recognizes the following command line options:


LimitationsTop | Previous | Next

tand runs out of memory if infile1 is too large.

See also TextTools General Features.


Return CodesTop | Previous | Next

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


Version HistoryTop | Previous

These are the released versions:

End of document