title: Bash: How to invoke command and store the result in a variable?
body: <p>Basically I want to be able to invoke a given command, in this case <code>mysql -uanon -ppwd -db mydb -e "select count(*) from table1"</code>. And then take this commands result (the count on that table) and place it in a variable in bash script. What is the simplest way to achieve this?</p>