From: Jim Meyering Date: Sat, 2 Jan 1999 19:32:14 +0000 (+0000) Subject: tsort docs X-Git-Tag: FILEUTILS-4_1-b2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a31aa355b3e0db46480de15820e906ec60fa68f4;p=thirdparty%2Fcoreutils.git tsort docs --- diff --git a/doc/textutils.texi b/doc/textutils.texi index 7fef52a1d6..c19c3b276d 100644 --- a/doc/textutils.texi +++ b/doc/textutils.texi @@ -41,6 +41,7 @@ START-INFO-DIR-ENTRY * sum: (textutils)sum invocation. Print traditional checksum. * tac: (textutils)tac invocation. Reverse files. * tail: (textutils)tail invocation. Output the last part of files. +* tsort: (textutils)tsort invocation. Topological sort. * tr: (textutils)tr invocation. Translate characters. * unexpand: (textutils)unexpand invocation. Convert spaces to tabs. * uniq: (textutils)uniq invocation. Uniqify files. @@ -118,7 +119,7 @@ This manual documents version @value{VERSION} of the GNU text utilities. * Formatting file contents:: fmt pr fold * Output of parts of files:: head tail split csplit * Summarizing files:: wc sum cksum md5sum -* Operating on sorted files:: sort uniq comm ptx +* Operating on sorted files:: sort uniq comm ptx tsort * Operating on fields within a line:: cut paste join * Operating on characters:: tr expand unexpand * Opening the software toolbox:: The software tools philosophy. @@ -160,6 +161,7 @@ Operating on sorted files * uniq invocation:: Uniqify files. * comm invocation:: Compare two sorted files line by line. * ptx invocation:: Produce a permuted index of file contents. +* tsort invocation:: Topological sort. @code{ptx}: Produce permuted indexes @@ -1890,7 +1892,8 @@ These commands work with (or produce) sorted files. * sort invocation:: Sort text files. * uniq invocation:: Uniqify files. * comm invocation:: Compare two sorted files line by line. -* ptx invocation:: +* ptx invocation:: Produce a permuted index of file contents. +* tsort invocation:: Topological sort. @end menu @@ -2351,6 +2354,57 @@ Upon normal completion @code{comm} produces an exit code of zero. If there is an error it exits with nonzero status. +@node tsort invocation +@section @code{tsort}: Topological sort + +@pindex tsort +@cindex topological sort + +@code{tsort} performs a topological sort on the given @var{file}, or +standard input if no input file is given or for a @var{file} of +@samp{-}. Synopsis: + +@example +tsort [@var{option}] [@var{file}] +@end example + +@code{tsort} reads its input as pairs of strings, separated by blanks, +indicating a partial ordering. The output is a total ordering that +corresponds to the given partial ordering. + +For example + +@example +tsort <