将DB2数据库查询结果返回给shell参数
db2 connect to [DBNAME]
a="select count(1) from [TABNAME]
echo "a:$a"
b=`db2 -tx "${a}"`
echo "b:$b"
if [ $b -eq 6 ] ; then
echo " yes !"
fi
db2 connect to [DBNAME]
a="select count(1) from [TABNAME]
echo "a:$a"
b=`db2 -tx "${a}"`
echo "b:$b"
if [ $b -eq 6 ] ; then
echo " yes !"
fi