|
NAMEptsort —
Prioritized topological sort
SYNOPSIS
DESCRIPTIONTheptsort utility takes a directed acyclic graph of
nodes as input and outputs the nodes in topological order. Unlike
tsort(1),
the ptsort utility allows nodes to be given a numeric
priority. Priorities are propagated along edges so that each node's priority
is greater than the priority of all its successors. Thus, it is possible to
boost a specific node so that it, and all its predecessors, will be listed
ahead of other unrelated nodes.
The following options are available:
The Each input line contains either two names or a name and a decimal integer, separated by any amount of whitespace. Any amount of leading or trailing whitespace is permitted. Names are arbitrary non-empty sequences of up to 255 printable, non-whitespace ASCII characters. It is strictly speaking possible, but not a good idea, for a node's name to consist entirely of digits. If the line contains two names, the effect is to insert a directed edge into the graph going from the first (predecessor) node to the second (successor) node. Either or both nodes are created if they do not already exist. If both names are identical, no edge is inserted, but the node is still created unless it already exists. If the line contains a name and a number, the effect is to raise the priority of that node to the given number, unless it is already higher. The node will be created if it does not already exist. Blank lines in the input are ignored. Any error in the input will cause If no error occurred, the DIAGNOSTICSIf an error occurred, theptsort utility exits with one
of the following codes:
Otherwise, it exits with code 0. SEE ALSOtsort(1)AUTHORSTheptsort utility and this manual page were written by
Dag-Erling Smørgrav
<des@des.no>.
BUGSTheptsort utility uses a completely different algorithm
than the similar
tsort(1)
and may therefore produce different (but toplogically equivalent) output when
given the same input.
The
Visit the GSP FreeBSD Man Page Interface. |