【发布时间】:2011-04-01 14:50:07
【问题描述】:
我正在尝试从 shell 脚本调用 perl 脚本,代码如下所示...
shell脚本test_sh
#Call the script
test2.pl ${PARTITION_ID} ${VNG_USER} ${VNG_PASSWORD} ${VNG_INSTANCE}
if [ $? -ne 0 ]
then
OP1ExitStatus -6
fi
执行时收到以下错误消息:
./test_sh[142]: test2.pl: not found
Failed in test_sh
两个文件的权限都是 755。
但是当 i 并通过传递所有参数直接从命令行调用 test2.pl 时,它会成功运行。 我也尝试了以下命令:
#Call the script
perl test2.pl ${PARTITION_ID} ${VNG_USER} ${VNG_PASSWORD} ${VNG_INSTANCE}
if [ $? -ne 0 ]
then
OP1ExitStatus -6
fi
但它也不起作用。 请让我知道如何继续以成功运行它。
【问题讨论】:
-
那么第二个“不工作”怎么办?有任何错误信息吗?
标签: perl