@ondoho
Even though there is no space between -e and the query, it does appear to be working fine.
Code:
mysql -u${mysqlUser} -p${mysqlPass} -Ae"FLUSH TABLES WITH READ LOCK; SELECT SLEEP(86400)" &
works because I can see a query running when looking at the processlist.
Code:
mysql -u${mysqlUser} -p${mysqlPass} -Ae"KILL QUERY ${SLEEP_ID};"
also works, because after this command the correct query is no longer running.
So although I agree with you that it looks better to add a space, it doesn't appear necessary
The command itself was never the issue though, that was working fine, it was the output I couldn't get rid of.
Luckily, with a little help from keefaz, it's fixed now though.