summaryrefslogtreecommitdiff
path: root/filter-illegal
blob: 8b29f3e807ae506c6b23e20d52aceb7b95f8d1e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env ruby

require 'zipf'

illegal = [ "[", "]", "|||" ]

in0 = File.new ARGV[0]
in1 = File.new ARGV[1]

i = 0
skipi = []
while line0 = in0.gets
  line1 = in1.gets
  skip = false
  illegal.each { |k|
    if line0.index(k) or line1.index(k) then
      skip = true
      skipi << i 
    end
  }
  i += 1
end

skipi.each { |j| puts j }