2014-03-06 36 views
0

我有以下Perl脚本代码来安装oracle数据库应用程序。如何让我的脚本等到上一个命令完成?

system("./runInstaller -silent -responsefile filename.rsp"); 
if($?==0) 
{ 
    //perform some operation type1; 
} 
else 
{ 
    //perform some operation type2; 
} 

在这段代码中,应该在完成安装应用程序后执行if块。但脚本与安装程序并行运行。

我都用了``EXEC,而不是制度,而是根据需要没有工作。

帮我解决这个问题。

在此先感谢。

+0

也许安装程序切换到后台的详细信息? –

+0

也许runInstaller立即返回? – anonymous

+0

不,runInstaller正在研究前景。 – user3274006

回答

2

使用runInstaller的-waitforcompletion选项使脚本等待,直到完成执行。所以现在:

system("./runInstaller -silent -responseFile filename.rsp"); 

将成为

system./runInstaller -silent -waitforcompletion -responseFile filename.rsp"); 

有关runInstaller的Click here

相关问题