summaryrefslogtreecommitdiff
path: root/sort-features
blob: 88bd7792587bbd8546bc1f1052f5f4a306fa705d (plain)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env ruby

h = {}
while line = STDIN.gets
  name, value = line.strip.split
  h[name] = value.to_f
end

h.sort_by { |name, value| -value }.each { |name, value| puts "#{name}\t#{value}" }