1 2 3 4 5 6 7 8 9 10 11 12 13 |
open(SRC) do |io|
open(DST, 'w') do |out|
io.grep(/^"(\d+)","(\d+)","([^"]+)","[^"]*","[^"]*"\r?\n|(^.+\r?\n)/) do |match|
if $4
STDERR << $4
else
out.printf("%08X\t%08X\t%2.2s\n", $1.to_i, $2.to_i, $3)
end
end
end
end
end
|
Pastie
