Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
User Commandstsort(1)


NAME

 tsort - topological sort

SYNOPSIS

 /usr/ccs/bin/tsort [file]

DESCRIPTION

 

The tsort command produces on the standard output a totally ordered list of items consistent with a partial ordering of items mentioned in the input file.

The input consists of pairs of items (nonempty strings) separated by blanks. Pairs of different items indicate ordering. Pairs of identical items indicate presence, but not ordering.

OPERANDS

 

The following operand is supported:

file
A path name of a text file to order. If no file operand is given, the standard input is used.

EXAMPLES

 Example 1. An example of the tsort command.
 

The command:

 
tsort <<EOF
a b c c d e
g g
f g e f
EOF

produces the output:

 
a
b
c
d
e
f
g

ENVIRONMENT VARIABLES

 

See environ(5) for descriptions of the following environment variables that affect the execution of tsort: LC_CTYPE, LC_MESSAGES, and NLSPATH.

EXIT STATUS

 

The following exit values are returned:

0
Successful completion.
>0
An error occurred.

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
AvailabilitySUNWbtool

SEE ALSO

 

lorder(1), attributes(5), environ(5)

DIAGNOSTICS

 

Odd data: there are an odd number of fields in the input file.


SunOS 5.9Go To TopLast Changed 1 Feb 1995

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.