fork download
  1. #!/usr/bin/ruby -w
  2. # answer: http://o...content-available-to-author-only...e.jp/qa/q7007816.html
  3.  
  4. puts ARGF.sort_by{|line|line.split("\t").map(&:to_i)}
Success #stdin #stdout 0s 4760KB
stdin
56	1324
15	5634
24	4446
24	3287
3	9999
56	5465
56	7544
24	8357
3	1
stdout
3	1
3	9999
15	5634
24	3287
24	4446
24	8357
56	1324
56	5465
56	7544