6001 strcat(9f) needs a manpage
[unleashed.git] / usr / src / man / man1 / tsort.1
blobf45f720e1e5c188eae7d5560c98360eb69820643
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 1992, X/Open Company Limited  All Rights Reserved  Portions Copyright (c) 1995, Sun Microsystems, Inc.  All Rights Reserved
3 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
4 .\" http://www.opengroup.org/bookstore/.
5 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
6 .\"  This notice shall appear on any product containing this material.
7 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
9 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
10 .TH TSORT 1 "Jun 28, 2007"
11 .SH NAME
12 tsort \- topological sort
13 .SH SYNOPSIS
14 .LP
15 .nf
16 \fBtsort\fR [\fIfile\fR]
17 .fi
19 .SH DESCRIPTION
20 .sp
21 .LP
22 The \fBtsort\fR command produces on the standard output a totally ordered list
23 of items consistent with a partial ordering of items mentioned in the input
24 \fIfile\fR.
25 .sp
26 .LP
27 The input consists of pairs of items (non-empty strings) separated by blanks.
28 Pairs of different items indicate ordering. Pairs of identical items indicate
29 presence, but not ordering.
30 .SH OPERANDS
31 .sp
32 .LP
33 The following operand is supported:
34 .sp
35 .ne 2
36 .na
37 \fB\fIfile\fR\fR
38 .ad
39 .RS 8n
40 A path name of a text file to order. If no \fIfile\fR operand is given, the
41 standard input is used.
42 .RE
44 .SH EXAMPLES
45 .LP
46 \fBExample 1 \fRAn example of the tsort command
47 .sp
48 .LP
49 The command:
51 .sp
52 .in +2
53 .nf
54 example% \fBtsort <<EOF
55 a b c c d e
56 g g
57 f g e f
58 EOF\fR
59 .fi
60 .in -2
61 .sp
63 .sp
64 .LP
65 produces the output:
67 .sp
68 .in +2
69 .nf
77 .fi
78 .in -2
79 .sp
81 .SH ENVIRONMENT VARIABLES
82 .sp
83 .LP
84 See \fBenviron\fR(5) for descriptions of the following environment variables
85 that affect the execution of \fBtsort\fR: \fBLANG\fR, \fBLC_ALL\fR,
86 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
87 .SH EXIT STATUS
88 .sp
89 .LP
90 The following exit values are returned:
91 .sp
92 .ne 2
93 .na
94 \fB\fB0\fR\fR
95 .ad
96 .RS 6n
97 Successful completion.
98 .RE
101 .ne 2
103 \fB\fB>0\fR\fR
105 .RS 6n
106 An error occurred.
109 .SH ATTRIBUTES
112 See \fBattributes\fR(5) for descriptions of the following attributes:
117 box;
118 c | c
119 l | l .
120 ATTRIBUTE TYPE  ATTRIBUTE VALUE
122 Interface Stability     Standard
125 .SH SEE ALSO
128 \fBlorder\fR(1), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
129 .SH DIAGNOSTICS
132 \fBOdd data:\fR there are an odd number of fields in the input file.