oracle结果赋给SHELL变量

来源:互联网 发布:mysql官方文档有问题 编辑:程序博客网 时间:2024/04/30 09:05
#!/usr/bin/ksh
sh /oracle/.profile
a=`sqlplus -s /nolog  <<!
conn aiki/aiki
set heading off
set ver off
set feedback off
select count(*) from aiki;
exit;
!`
echo $a
exit