I'd like to run multiple MySQL queries and save them to specified files. Queries are saved in a bash script,
cat queries.sh mysql -u <user> -p <DBname> -e "select Col1 from Table1 where Condition;" > /home/<user>/queries/Col1Table1Cond mysql -u <user> -p <DBname> -e "select Col5 from Table2 where Condition;" > /home/<user>/queries/Col5Table2Cond
Executing the script is not enough, since
<user> has to input his password at each query and this is compromising the script flow.