Created
February 15, 2017 10:09
-
-
Save eripa/62fd48c9c68523f9bd325b3e48d225e9 to your computer and use it in GitHub Desktop.
drop mysql table from dump
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
START_LINE=$(($(grep -n "Table structure for table \`wp_options\`" dump_tmp.sql | cut -d':' -f 1) -1)) | |
END_LINE=$(($(grep -n "ALTER TABLE \`wp_options\` ENABLE KEYS" dump_tmp.sql | cut -d':' -f 1) +1)) | |
sed "${START_LINE},${END_LINE}d" dump_tmp.sql > dump_tmp-no_options.sql | |
mv dump_tmp-no_options.sql dump_tmp.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment