#! /bin/bash
set -x
sql="show tables;"
~/mysql/bin/mysql --default-character-set=utf8 -hxxxx -Pxxx -pxxx -uxxx -Drxxx $sql
~/mysql/bin/mysql --default-character-set=utf8 -hxxxx -Pxxx -pxxx -uxxx -Drxxx "$sql"
Results of enforcement:
The execution with double quotation marks succeeded. Execution without double quotation marks failed.
What is the difference between $sql
and "$sql"
?