fork download
  1. #!/bin/bash
  2.  
  3. nl -v0 -ba|sed -r ':;s/(\S+\s+)(\S+) /\1\2\n\1 /;t;s/^\s*\S+\s*$/& &/'|tsort|tac
Success #stdin #stdout 0s 5076KB
stdin
1 2
2

stdout
2
1
0