1tsort(1)                         User Commands                        tsort(1)
2
3
4

NAME

6       tsort - topological sort
7

SYNOPSIS

9       tsort [file]
10
11

DESCRIPTION

13       The  tsort  command  produces  on the standard output a totally ordered
14       list of items consistent with a partial ordering of items mentioned  in
15       the input file.
16
17
18       The  input  consists of pairs of items (non-empty strings) separated by
19       blanks. Pairs of different items indicate ordering. Pairs of  identical
20       items indicate presence, but not ordering.
21

OPERANDS

23       The following operand is supported:
24
25       file    A  path  name  of  a  text file to order. If no file operand is
26               given, the standard input is used.
27
28

EXAMPLES

30       Example 1 An example of the tsort command
31
32
33       The command:
34
35
36         example% tsort <<EOF
37         a b c c d e
38         g g
39         f g e f
40         EOF
41
42
43
44
45       produces the output:
46
47
48         a
49         b
50         c
51         d
52         e
53         f
54         g
55
56
57

ENVIRONMENT VARIABLES

59       See environ(5) for descriptions of the following environment  variables
60       that  affect  the  execution  of tsort: LANG, LC_ALL, LC_CTYPE, LC_MES‐
61       SAGES, and NLSPATH.
62

EXIT STATUS

64       The following exit values are returned:
65
66       0     Successful completion.
67
68
69       >0    An error occurred.
70
71

ATTRIBUTES

73       See attributes(5) for descriptions of the following attributes:
74
75
76
77
78       ┌─────────────────────────────┬─────────────────────────────┐
79       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
80       ├─────────────────────────────┼─────────────────────────────┤
81       │Availability                 │SUNWbtool                    │
82       ├─────────────────────────────┼─────────────────────────────┤
83       │Interface Stability          │Standard                     │
84       └─────────────────────────────┴─────────────────────────────┘
85

SEE ALSO

87       lorder(1), attributes(5), environ(5), standards(5)
88

DIAGNOSTICS

90       Odd data: there are an odd number of fields in the input file.
91
92
93
94SunOS 5.11                        28 Jun 2007                         tsort(1)
Impressum