From 2b1d7f881c19c4d4b5afae194e02d3300c7675d0 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Tue, 5 Jul 2016 11:01:46 +0200 Subject: mv --- sort-features | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 sort-features (limited to 'sort-features') diff --git a/sort-features b/sort-features new file mode 100755 index 0000000..88bd779 --- /dev/null +++ b/sort-features @@ -0,0 +1,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}" } + -- cgit v1.2.3