Can mysqlimport take a directory instead of file as input?
<p>I have a big table file which are split into multiple smaller files in a directory. Is it possible to let mysqlimport to take a directory of files as one parameter? </p>

<pre><code>mysqlimport [options] db_name textfile1 ...
</code></pre>

<p>Edited:</p>

<pre><code>#!/bin/bash

cd /home/abigail/output/bword/split

for f in *.txt
echo "Is loading the file $f now ..."
do

    mysql -u linga -p --execute="use wordDS; LOAD DATA LOCAL INFILE '$f' INTO TABLE Term FIELDS TERMINATED BY '\t'  LINES TERMINATED BY '\n' (terms_id); SHOW WARNINGS"
done
</code></pre>

<p>This almost works, except that it complains this line:</p>

<p>echo "Is loading the file $f now ..."</p>

<pre><code>/home/abigail/scripts/loadData.sh: line 6: syntax error near unexpected token `echo'                                                                                                                                                         
/home/abigail/scripts/loadData.sh: line 6: `echo "Is loading the file $f now ..."'  
</code></pre>