3 ms·
tsort is one of my favorites, mostly because it's totally pointless until you need it and then it works exactly right. I love it.
by jfb 13y ago
tsort is one of my favorites, mostly because it's totally pointless until you need it and then it works exactly right. I love it.
- sambeau 13y agoWow. I just read the man page for tsort and I am none the wiser. tsort takes a list of pairs of node names representing directed arcs in a graph and prints the nodes in topologi-cal order on standard output. It's not often I understand nothing on a man page. But this time, I'm stumped!
- tod222 13y agohttp://en.wikipedia.org/wiki/Topological_sorting http://en.wikipedia.org/wiki/Topological_sorting
- jfb 13y agoSay you have a set of tasks you need to do, and some of those depend on others. Now, you want to perform those tasks in order. The question then becomes: in which order? That's the problem that tsort (1) solves. It's a way to do some of what make does without having to write a Makefile. 99.9% of the time, it never comes up, but when it does, it is very, very handy to be able to this in a shell pipeline. HTH.
- Nick_C 13y agoMe too. Then I read the info, it gives an interesting historical perspective of why tsort came about. On a system with GNU utils installed: info coreutils 'tsort invocation'