#!/bin/bash # Jovanovic, 2013-01, load from CSV file to croala_lemmadb SQL # usage: ./csv2croala_db.sh filename (= $1) cmd="LOAD DATA LOCAL INFILE '$1' INTO TABLE croala_lemmadb FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '\n' (forma,lemma,pofs,stem,note);" # echo ${cmd} mysql -u philologic -p philologic -e "$cmd" # end of script