diff options
author | Patrick Simianer <p@simianer.de> | 2014-03-16 20:44:45 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2014-03-16 20:44:45 +0100 |
commit | 4753aee16960de5b9c3da926dde18b332b34edf4 (patch) | |
tree | 7f01bee077af8d3ee3db061d317f6651d09a951a | |
parent | 224be546596aae5fe3bcd9c46d3eac3f84b386fd (diff) |
better no_non_printables
-rwxr-xr-x | no_non_printables | 2 | ||||
-rwxr-xr-x | sort_features | 10 |
2 files changed, 11 insertions, 1 deletions
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}" } + |