/ Published in: Ruby
Courtesy of Jesse.
Expand |
Embed | Plain Text
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
You need to login to post a comment.
