is it possible ? i have tried like this .. got error..
Expand|Select|Wrap|Line Numbers
- #!bin/sh
- password=xxx
- mysql -u root -p$password -h 192.168.1.8 << y
- use dbssys;
- d ="`select mem from profile` ";
- echo $d
- quit
- y
test.sh: command substitution: line 1: syntax error near unexpected token `from'
test.sh: command substitution: line 1: `select mem from profile'
ERROR 1064 (42000) at line 2: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'd =" "' at line 1