[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    tsort(1) manual page Table of Contents

Name

tsort - topological sort

Synopsis

/usr/ccs/bin/tsort [ file ]

Availability

SUNWbtool

Description

The tsort command produces on the standard output a totally ordered list of items consistent with a partial ordering of items mentioned in the input file.

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

Operands

The following operand is supported:
file
A path name of a text file to order. If no file operand is given, the standard input is used.

Examples

The command:

tsort <<EOF
a b c c d e
g g
f g e f
EOF

produces the output:


a
b
c
d
e
f
g

Environment

See environ(5) for descriptions of the following environment variables that affect the execution of tsort: LC_CTYPE , LC_MESSAGES , and NLSPATH .

Exit Status

The following exit values are returned:
  1. Successful completion.
    >0
    An error occurred.

    See Also

    lorder(1) , environ(5)

    Diagnostics

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


    Table of Contents