Skip to content

Instantly share code, notes, and snippets.

@amccarty
Created March 29, 2017 14:31
Show Gist options
  • Save amccarty/c5e5a14e6b45be4279f2c525904f569d to your computer and use it in GitHub Desktop.
Save amccarty/c5e5a14e6b45be4279f2c525904f569d to your computer and use it in GitHub Desktop.
Prepend to a sql file before importing via command line
sed -i '1s;^;SET\ FOREIGN_KEY_CHECKS\ =\ 0\;\nSET\ UNIQUE_CHECKS\ = \ 0\;\nSET\ AUTOCOMMIT\ =\ 0\;\n;' scholarsdev-opt.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment