This examples demonstrates how a shell script can pass a parameter to a sql query.

are variables to be passed at run time. Here is the wrapper shell script:

To execute the script from command line, I can do something like this:
# mysql_script_runner.sh get_customer_record.sql ‘2011-06-01’ ‘2011-06-12 23:59:59’ cust_rec.dat