COHERENT manpages

This page displays the COHERENT manpage for tsort [Topological sort].

List of available manpages
Index


tsort -- Command

Topological sort
tsort [file]

tsort performs a topological sort of  a set of input items.  The input file
(or the standard input, if no file is given) specifies an ordering on pairs
of  items.  It  consists of  pairs of  items separated  by blanks,  tabs or
newlines.  If a pair contains the same item twice, it simply indicates that
the item is in the input set.  Otherwise, the pair indicates that the first
item precedes the second in the ordering.

tsort prints a sorted list of the input items on the standard output.

See Also

commands,
sort

Diagnostics

tsort prints an  error message on the standard error  if its input contains
an odd number of items or if the specified ordering includes a cycle.