NAME tsort - topologically sort symbols SYNOPSIS tsort [files ...] DESCRIPTION Tsort topologically sorts the symbols in the named files. If no files are specified, or the filename '-' is given, tsort reads the standard input. A symbol is considered any string of characters delimited by blanks or tabs. Each line of the input is assumed to be of the form a b c ... which states that a precedes b, a precedes c, and so on. Note that there is nothing implied about the ordering of b and c. A line consisting of a single symbol simply "declares" that symbol without specifying any ordering relations about it. The output is a topologically sorted list of symbols, one per line. For example, suppose you have trouble getting up in the morning because you can't quite remember what actions have to be performed in which order. However, you do know that the first action in the following list precedes all others on the line: set_alarm turn_off_alarm wake_up get_out_of_bed turn_off_alarm set_alarm wake_up Using tsort to sort the above list would produce the following set of actions for getting out of bed: set_alarm wake_up turn_off_alarm get_out_of_bed DIAGNOSTICS circular The input specifies a graph that contains at least one cycle. out of storage The input is too large. The size of tsort's buffer is determined by the MAXBUF definition in the source code. SEE ALSO sort AUTHORS David Hanson and friends (U. of Arizona)