TUNIQ v2.00 - print lines that evaluate uniquely
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

tuniq [log logfile] [options] [from infile] [to outfile] expr [...]


DescriptionTop | Previous | Next

tuniq prints, to outfile, the lines in infile that evaluate uniquely on the given expression(s).

Expressions are as for tcols.

infile must be an ASCII text file. tuniq sees each input line as a row of (by default) whitespace-separated fields; see tcols for more info.

tuniq ignores empty (whitespace only) input lines.

The output lines are identical to the input lines.

tuniq compares data the same way as trows does.

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


ExampleTop | Previous | Next

Consider the file "records.txt":

        Band             "The Band"            1969 LP
        "Violent Femmes" "Violent Femmes"      1983 LP
        "Violent Femmes" "Violent Femmes"      1983 CD
        Beatles          Revolver              1966 CD
        Beatles          "Rubber Soul"         1965 CD
        "Waits, Tom"     Swordfishtrombones    1983 CD
        Band             "Music From Big Pink" 1968 LP
        "Waits, Tom"     Swordfishtrombones    1983 LP

The command:

        tuniq from records.txt $1 $2 $3

prints the record list without CD/LP duplicates:

        Band             "The Band"            1969 LP
        "Violent Femmes" "Violent Femmes"      1983 LP
        Beatles          Revolver              1966 CD
        Beatles          "Rubber Soul"         1965 CD
        "Waits, Tom"     Swordfishtrombones    1983 CD
        Band             "Music From Big Pink" 1968 LP


OptionsTop | Previous | Next

tuniq recognizes the following command line options:


LimitationsTop | Previous | Next

tuniq has the same limitations as tcols.

tuniq runs out of memory when infile, or the expressions evaluated thereof, are too large.


Return CodesTop | Previous | Next

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


Version HistoryTop | Previous

These are the released versions:

End of document