summaryrefslogtreecommitdiff
path: root/scripts/geoquery/select.rb
blob: fbf8d14f6120c556ed916cec7e2a0354cd5bc368 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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