Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
# @see http://stackoverflow.com/a/11522507
if ARGV.empty?
$stdout.puts "Usage: cleanup.rb dump.sql table_a [table_b ...]"
else
args = ARGV.reverse
file = args.pop
output_file = "#{file.gsub(File.extname(file), '')}-cleanup.sql"