#!/bin/sh
HOST=192.168.5.40
USER=abc
PASS=123456
QUERY=`mysql -h$HOST -u$USER -p$PASS << EOF
use testdb;
select * from person where name='LiMing';
exit
EOF`
echo $QUERY
#!/bin/sh
HOST=192.168.5.40
USER=abc
PASS=123456
QUERY=`mysql -h$HOST -u$USER -p$PASS << EOF
use testdb;
select * from person where name='LiMing';
exit
EOF`
echo $QUERY