Basically I want to be able to invoke a given command, in this case mysql -uanon -ppwd -db mydb -e \"select count(*) from table1\". And then take this commands
mysql -uanon -ppwd -db mydb -e \"select count(*) from table1\"
$ A=$(mysql -uanon -ppwd -db mydb -e "select count(*) from table1") $ echo $A
In other words, use the $() syntax.