Skip to content

Instantly share code, notes, and snippets.

View je8n's full-sized avatar
🏠
Working from home

Serkan Özdemir je8n

🏠
Working from home
View GitHub Profile
@je8n
je8n / drive-format-ubuntu.md
Created July 23, 2018 13:54 — forked from keithmorris/drive-format-ubuntu.md
Partition, format, and mount a drive on Ubuntu
@je8n
je8n / importsqlindir.sh
Created July 20, 2018 20:54
linux foreach import several sql files in folder with mysql terminal
#query: mysql-u[username] -p[password] -e [query]
for SQL in *.sql; do DB=${SQL/\.sql/}; echo importing $DB; mysql -uroot -p -e "create database $DB"; done
# first create filenames database
for SQL in *.sql; do DB=${SQL/\.sql/}; echo importing $DB; mysql -uroot -p $DB < $SQL; done
#import file to filename database