Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bsouthga
Created August 28, 2015 00:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsouthga/b64bc850c348ada571c1 to your computer and use it in GitHub Desktop.
Save bsouthga/b64bc850c348ada571c1 to your computer and use it in GitHub Desktop.
Shell script to fix enron mysql syntax in enron data dump from http://bailando.sims.berkeley.edu/enron_email.html
#!/usr/bin/env bash
# change encoding for sed
LC_CTYPE=C
LANG=C
# replace mysql syntax for 4 -> 5
cat ./enron.sql \
| sed -e 's/timestamp(14)/timestamp/' \
| sed -e 's/) TYPE=/) ENGINE=/' \
> enron-fixed.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment