test.sh: #!/bin/sh # # TEMP=$(mysql -uroot --database dbname -e "select name from tablename where id=1"); echo $TEMP;