summaryrefslogtreecommitdiff
path: root/select_from
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2016-07-05 11:01:46 +0200
committerPatrick Simianer <p@simianer.de>2016-07-05 11:01:46 +0200
commit2b1d7f881c19c4d4b5afae194e02d3300c7675d0 (patch)
tree5a06ee7de98640a39244b57bb369697176b44ebf /select_from
parent69949dda35c3ea21d8e926e5f0a596a0a0f61c6a (diff)
mv
Diffstat (limited to 'select_from')
-rwxr-xr-xselect_from28
1 files changed, 0 insertions, 28 deletions
diff --git a/select_from b/select_from
deleted file mode 100755
index 7ab40e7..0000000
--- a/select_from
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'trollop'
-require 'zipf'
-
-opts = Trollop::options do
- banner "select_from [--invert] -i <file> < <line separated data>"
- opt :index, "Line numbers to output.", :required => true
- opt :invert, "Invert selection.", :type => :bool, :short => '-j', :default => false
-end
-
-accept = {}
-
-f = ReadFile.new ARGV[0]
-f.readlines_strip.each { |line|
- accept[line.strip.to_i] = true
-}
-
-i = 0
-while line = STDIN.gets
- if accept[i] && !opts[:invert]
- STDOUT.write line
- elsif !accept[i] && opts[:invert]
- STDOUT.write line
- end
- i += 1
-end
-