Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wow. 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!


Say 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.



Me 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'




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: