logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

tsort.1p (4285B)


  1. '\" et
  2. .TH TSORT "1P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. tsort
  12. \(em topological sort
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. tsort \fB[\fIfile\fB]\fR
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR tsort
  21. utility shall write to standard output a totally ordered list of items
  22. consistent with a partial ordering of items contained in the input.
  23. .P
  24. The application shall ensure that the input consists of pairs of items
  25. (non-empty strings) separated by
  26. <blank>
  27. characters. Pairs of different items indicate ordering. Pairs of
  28. identical items indicate presence, but not ordering.
  29. .SH OPTIONS
  30. None.
  31. .SH OPERANDS
  32. The following operand shall be supported:
  33. .IP "\fIfile\fR" 10
  34. A pathname of a text file to order. If no
  35. .IR file
  36. operand is given, the standard input shall be used.
  37. .SH STDIN
  38. The standard input shall be used if no
  39. .IR file
  40. operand is specified, and shall be used if the
  41. .IR file
  42. operand is
  43. .BR '\-'
  44. and the implementation treats the
  45. .BR '\-'
  46. as meaning standard input.
  47. Otherwise, the standard input shall not be used.
  48. See the INPUT FILES section.
  49. .SH "INPUT FILES"
  50. The input file shall be a text file.
  51. .SH "ENVIRONMENT VARIABLES"
  52. The following environment variables shall affect the execution of
  53. .IR tsort :
  54. .IP "\fILANG\fP" 10
  55. Provide a default value for the internationalization variables that are
  56. unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
  57. .IR "Section 8.2" ", " "Internationalization Variables"
  58. for the precedence of internationalization variables used to determine
  59. the values of locale categories.)
  60. .IP "\fILC_ALL\fP" 10
  61. If set to a non-empty string value, override the values of all the
  62. other internationalization variables.
  63. .IP "\fILC_CTYPE\fP" 10
  64. Determine the locale for the interpretation of sequences of bytes of
  65. text data as characters (for example, single-byte as opposed to
  66. multi-byte characters in arguments and input files).
  67. .IP "\fILC_MESSAGES\fP" 10
  68. .br
  69. Determine the locale that should be used to affect the format and
  70. contents of diagnostic messages written to standard error.
  71. .IP "\fINLSPATH\fP" 10
  72. Determine the location of message catalogs for the processing of
  73. .IR LC_MESSAGES .
  74. .SH "ASYNCHRONOUS EVENTS"
  75. Default.
  76. .SH STDOUT
  77. The standard output shall be a text file consisting of the order list
  78. produced from the partially ordered input.
  79. .SH STDERR
  80. The standard error shall be used only for diagnostic messages.
  81. .SH "OUTPUT FILES"
  82. None.
  83. .SH "EXTENDED DESCRIPTION"
  84. None.
  85. .SH "EXIT STATUS"
  86. The following exit values shall be returned:
  87. .IP "\00" 6
  88. Successful completion.
  89. .IP >0 6
  90. An error occurred.
  91. .SH "CONSEQUENCES OF ERRORS"
  92. Default.
  93. .LP
  94. .IR "The following sections are informative."
  95. .SH "APPLICATION USAGE"
  96. The
  97. .IR LC_COLLATE
  98. variable need not affect the actions of
  99. .IR tsort .
  100. The output ordering is not lexicographic, but depends on the pairs of
  101. items given as input.
  102. .SH EXAMPLES
  103. The command:
  104. .sp
  105. .RS 4
  106. .nf
  107. tsort <<EOF
  108. a b c c d e
  109. g g
  110. f g e f
  111. h h
  112. EOF
  113. .fi
  114. .P
  115. .RE
  116. .P
  117. produces the output:
  118. .sp
  119. .RS 4
  120. .nf
  121. \fBa
  122. b
  123. c
  124. d
  125. e
  126. f
  127. g
  128. h\fR
  129. .fi
  130. .P
  131. .RE
  132. .SH RATIONALE
  133. None.
  134. .SH "FUTURE DIRECTIONS"
  135. None.
  136. .SH "SEE ALSO"
  137. The Base Definitions volume of POSIX.1\(hy2017,
  138. .IR "Chapter 8" ", " "Environment Variables"
  139. .\"
  140. .SH COPYRIGHT
  141. Portions of this text are reprinted and reproduced in electronic form
  142. from IEEE Std 1003.1-2017, Standard for Information Technology
  143. -- Portable Operating System Interface (POSIX), The Open Group Base
  144. Specifications Issue 7, 2018 Edition,
  145. Copyright (C) 2018 by the Institute of
  146. Electrical and Electronics Engineers, Inc and The Open Group.
  147. In the event of any discrepancy between this version and the original IEEE and
  148. The Open Group Standard, the original IEEE and The Open Group Standard
  149. is the referee document. The original Standard can be obtained online at
  150. http://www.opengroup.org/unix/online.html .
  151. .PP
  152. Any typographical or formatting errors that appear
  153. in this page are most likely
  154. to have been introduced during the conversion of the source files to
  155. man page format. To report such errors, see
  156. https://www.kernel.org/doc/man-pages/reporting_bugs.html .