tsort
v0.0.28
tsort [OPTIONS] FILE
Topological sort the strings in FILE. Strings are defined as any sequence of tokens separated by whitespace (tab, space, or newline), ordering them based on dependencies in a directed acyclic graph (DAG). Useful for scheduling and determining execution order. If FILE is not passed in, stdin is used instead.
Options
Examples
Perform a topological sort consistent with a partial sort per line of input separated by blanks:
tsort {{path/to/file}}
Perform a topological sort consistent on strings:
echo -e "{{UI Backend\nBackend Database\nDocs UI}}" | tsort
The examples are provided by the tldr-pages project under the CC BY 4.0 License.
Please note that, as uutils is a work in progress, some examples might fail.