https://github.com/jhbadger/scripts
Raw File
Tip revision: 6ad694835e70be1c38b4cc13806c5b4361f669fc authored by Jonathan Badger on 12 January 2024, 20:33:42 UTC
report misses in virtualPCR
Tip revision: 6ad6948
uniqIPATH
#!/usr/bin/env ruby

require 'ostruct'
require 'optparse'
opt = OpenStruct.new

ARGV.options {|opts|
  opts.banner << " ipath-list"
  #opts.on(nil, "--report", "run apisReport when done") {|t| opt.report = t}    
  begin
    opts.parse!
  rescue
    STDERR.puts $!.message
    STDERR.puts opts
    exit(1)
  end
  if (ARGV.size != 1)
    STDERR.puts opts
    exit(1)
  end
}

list, rest = ARGV

seen = Hash.new
File.new(list).each {|line|
  ec, color, width = line.chomp.split(" ")
  seen[ec] = true if width == "W10"
  print line if width=="W10" || !seen[ec]
}
back to top