tsort

Perform a topological sort. A common use is to show the dependency order of nodes in a directed acyclic graph. More information: <https://www.gnu.org/software/coreutils/tsort>.

Install

All systems
curl cmd.cat/tsort.sh
Debian Debian
apt-get install coreutils
Ubuntu
apt-get install coreutils
Alpine
apk add coreutils
Arch Arch Linux
pacman -S coreutils
image/svg+xml Kali Linux
apt-get install coreutils
CentOS
yum install coreutils
Fedora
dnf install coreutils
Windows (WSL2)
sudo apt-get update sudo apt-get install coreutils
OS X
brew install coreutils
Raspbian
apt-get install coreutils
Docker
docker run cmd.cat/tsort tsort powered by Commando

Perform a topological sort. A common use is to show the dependency order of nodes in a directed acyclic graph. More information: <https://www.gnu.org/software/coreutils/tsort>.

  • 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

© tl;dr; authors and contributors