#!/bin/bash
DATABASE=$1
TABLE=$2
USER=
PASSWORD=
mysql --local-infile -D $DATABASE -u $USER -p$PASSWORD -h 127.0.0.1 --execute="LOAD DATA LOCAL INFILE '$TABLE.csv' INTO TABLE $TABLE FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '\n' IGNORE 1 LINES; SHOW WARNINGS" > $TABLE.output
cat $TABLE.output

#!/bin/bash
DATABASE=$1
TABLE=$2
USER=
PASSWORD=
mysql --local-infile -D $DATABASE -u $USER -p$PASSWORD -h 127.0.0.1 --execute="LOAD DATA LOCAL INFILE '$TABLE.csv' INTO TABLE $TABLE FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '\n' IGNORE 1 LINES; SHOW WARNINGS" > $TABLE.output
dos2unix $TABLE.csv
cat $TABLE.output

Make sure line endings are correct.
Make sure line endings are correct.
