[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Commands Reference, Volume 5

tsort Command

Purpose

Sorts an unordered list of ordered pairs (a topological sort).

Syntax

tsort-- ] [ File ]

Description

The tsort command reads from File or standard input an unordered list of ordered pairs, builds a completely ordered list, and writes it to standard output.

The input File should contain pairs of non-empty strings separated by blanks. Pairs of different items indicate a relative order. Pairs of identical items indicate presence, but no relative order. You can use the tsort command to sort the output of the lorder command.

If File contains an odd number of fields, an appropriate error message is displayed.

Flag

-- (Double hyphen) Interprets all arguments following the -- flag as file names. If the file is named --, use tsort -- --.

Exit Status

This command returns the following exit values:

0 Successful completion.
>0 An error occurred.

Files

/usr/ccs/bin/tsort Contains the tsort command.
/usr/ccs/bin/tsort Contains symbolic link to the tsort command.

Related Information

The ar command, ld command, lorder command, xargs command.

The Commands Overview in AIX Version 4.3 System User's Guide: Operating System and Devices.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]