diff options
Diffstat (limited to 'scripts/geoquery/select.rb')
-rwxr-xr-x | scripts/geoquery/select.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/geoquery/select.rb b/scripts/geoquery/select.rb new file mode 100755 index 0000000..fbf8d14 --- /dev/null +++ b/scripts/geoquery/select.rb @@ -0,0 +1,20 @@ +#!/usr/bin/env ruby + +require 'nlp_ruby' + + +def main + ids = [] + ids = ReadFile.readlines_strip(ARGV[0]).map{ |i| i.strip.to_i } if ARGV[0] + delete_ids = [] + delete_ids = ReadFile.readlines_strip(ARGV[1]).map{ |i| i.strip.to_i } if ARGV[1] + i = 0 + while line = STDIN.gets + puts line if ids.include?(i)&&!delete_ids.include?(i) + i += 1 + end +end + + +main + |