in reply to Sorting by association, a tail of dependency resolving gone nowhere

Check out the tsort utility, it already does this.
  • Comment on Re: Sorting by association, a tail of dependency resolving gone nowhere