Last active
August 29, 2015 14:18
-
-
Save michaelsanford/4b8ea457a9c2b43d2204 to your computer and use it in GitHub Desktop.
Nuke mysql conditional comment markers in vim
This file contains 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
Two vim editor commands to nuke mysql conditional comment markers in | |
MySQL dumps, but not the statement within them: | |
: %s/\/\*!\d\+\s//g | |
: %s/\*\///g | |
Or you can use sed: | |
sed -i 's/\/\*!\d\+\s//g' dump.sql | |
sed -i 's/\*\///g' dump.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will turn
into
(Conditional comments invariably break my database dumps, even with the same mysql version.)