Ruby script for turning an Oracle .tab file into something diffable
output = []
table = ""
while line = STDIN.gets
line.chomp!
if line =~ "CREATE TABLE (.*)" then
table = $1
end
if line =~ "^ [,(].*" then
output << table + "." + line[2..-1]
end
end
puts output.sort
0 Comments:
Post a Comment
<< Home