vim test.sh
#Define variables
MYSQL_HOME=/usr
SQL_SCRIPT_DB_CONNECTION_STRING='-uroot -p'root''
SQL_SCRIPT_PARAMETERS_LIST="'PARAM1 PARAM2 PARAM3'"
#Execute the command
#CMD_SQL_SCRIPT_EXECUTION=${MYSQL_HOME}/bin/mysql ${SQL_SCRIPT_DB_CONNECTION_STRING} -e "set @VAR1=$SQL_SCRIPT_PARAMETERS_LIST ; source ${SQL_SCRIPT_FILE_LOCATION}/${SQL_SCRIPT_NAME}.sql ;" >> ${myLogFile}
${MYSQL_HOME}/bin/mysql ${SQL_SCRIPT_DB_CONNECTION_STRING} -e "set @VAR=$SQL_SCRIPT_PARAMETERS_LIST;
set @VAR_NUM=length(@VAR)-length(REPLACE(@VAR,' ',''))+1; /* define the total number of the variables */
set @VAR_POS=0; /* define the variable position in the string */
/* define the variables' value, if the the variable doesn't exist, its value is null */</