fork(1) 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
2
0 3

2
stdout
2
0
3
1