tsort (Unix)

From Wikipedia, the free encyclopedia


tsort is a command line utility initially written for use with the Unix operating system, that performs a topological sort on the standard input.

Common use:

$ tsort <option> processname ...

For example, if the file "myfile" contains

a s
b a
a a

then the output of

tsort myfile

is

b
a
s

According to its info page, this command was initially written for the linking of the programs in the first versions of Unix, where a file were processed in order; but since the usage of ar or ranlib, which generate symbols table before linking, this utility has lost its importance.

[edit] See also