Skip to content

Instantly share code, notes, and snippets.

View onurcanalp's full-sized avatar

Onur onurcanalp

View GitHub Profile
@onurcanalp
onurcanalp / evm
Created February 2, 2018 07:49 — forked from unique1984/evm
easy virtualbox management bash script
#!/bin/bash
#---------------------------------------------------------------------#
# evm #
# #
# easy virtualbox management bash script #
# #
# Script : evm #
# Version : 1.0.0 #
# Author : Yasin KARABULAK <yasinkarabulak@gmail.com> #
# Date : 2017-08-30 #
#!/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