我有两个功能-ABC,XYZ。ABC 删除 table1 中的一些行作为 user1,XYZ 删除一些用户作为 DB 用户。首先我打电话给ABC,然后是XYZ。ABC 函数正在执行,但在 XYZ 处失败 - “XYZ:找不到命令”
function ABC
{
sqlplus -s $ur1/$pwd@$SID << EOF
delete from table1 where row_name = 'A1';
delete from table2 where row_name = 'A2';
exit
EOF
}
function XYZ
{
sqlplus eip_dba/eip_dba$result@${input} << eof
set timing off
set serveroutput on size 10000
set feedback off
spool xyz_$input.out
drop user usr1 cascade;
drop user usr2 cascade;
drop user usr3 cascade;
commit;
exit
eof
}
ABC
XYZ
bash-3.2$ ./db_test.sh
2 rows deleted.
2 rows deleted.
./db_test.sh: line 100: XYZ: command not found
请让我知道出了什么问题。
提前致谢。