Hi Oswaldo..
You have the parameter inside the sql file , not in the script itself.
Try this:
#!/bin/bash
QUERY=load data infile '/home/loader/txt/file_${date_proc}.txt into table
debits
fields terminated by ';'
mysql -u user -ppass -D dbname -e $QUERY
Gurhan
-Original Message-
Try:
echo
load data infile '/home/loader/txt/file_${date_proc}.txt' into table debits
fields terminated by ';'
| mysql -u user -ppass dbname
Oswaldo Castro wrote:
Hi List
I'm new to MySQL and I need help on how to pass shell parameter to a mysql
script file (bash/SuSE 7.2)
I have one