I'm trying to create a script to automatically delete all of the tables from a database using shell.
The commented out variable $drop works fine, however when I try to substitute in the table
for table in $tables
do
command="'drop table ${table}'"
# drop=$(${login} -e 'drop table test') -- this works fine
drop=$(${login} -e $command)
echo $drop
# echo -e "Removed table ${table}"
done