I'm trying to run a mysql query on a remote host using a bash script.
${MYSQL} -u ${USER} -p${PASS} -P${PORT} -h ${HOST} -e "select * from information_schema;"
My PASS looks something like "dfsf#DFD". It conatins '#' character. For some reasons the PASS is not retrieving correctly in the script. Its getting chopped off after '#'.
And for some reason including source /etc/environment
in the script, seems to fix the problem.
I want to understand why is this happening. How to make it work without the source
statement.