From 4753aee16960de5b9c3da926dde18b332b34edf4 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sun, 16 Mar 2014 20:44:45 +0100 Subject: better no_non_printables --- no_non_printables | 2 +- sort_features | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 sort_features diff --git a/no_non_printables b/no_non_printables index 20d1e3d..9f9e3f9 100755 --- a/no_non_printables +++ b/no_non_printables @@ -1,4 +1,4 @@ #!/bin/sh -sed 's/\xEF\xBB\xBF//g' | sed 's/\xEF\xB7\x93//g' +sed 's/\xEF\xBB\xBF//g' | sed 's/\xEF\xB7\x93//g' | sed 's/[[:cntrl:]]//g' 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