/ Published in: Ruby

Courtesy of Jesse.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
ruby -ne '@found=true if $_ =~ /^CREATE TABLE `foo`/i; next unless @found; exit if $_ =~ /^CREATE TABLE (?!`foo`)/i; puts $_;' giant_sql_dump.sql > foo.sql
Comments
