Skip to content

Instantly share code, notes, and snippets.

View nmcclain's full-sized avatar

Ned McClain nmcclain

View GitHub Profile
{
"status":"OK",
"EstNumber":"M89",
"Company":"Hillshire Brands Company",
"Street":"4613 Speaker Road",
"City":"Kansas City",
"State":"KS",
"Zip":"66106",
"Phone":"913-233-0399",
"GrantDate":"10\/10\/12",
{
"status":"OK",
"establishments": [
"P44762",
"V13453",
"V9687",
...
]
}
@nmcclain
nmcclain / mysql2sqlite.sh
Created March 28, 2012 02:32 — forked from esperlu/mysql2sqlite.sh
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite