perl 脚本里调用shell 以及获取返回值

来源:互联网 发布:一元购平台源码 编辑:程序博客网 时间:2024/06/05 16:48
perl脚本里调用shell以及获取返回值,如下:
 
#!/usr/bin/perl
 
$output = qx(/home/irdetogame/lucy/CMGC/processAPK.sh);
 
$exitcode = $? >>8;
 
print "output = " . $output;
 
print "exitcode = " . $exitcode;

原创粉丝点击