Linux的par文件运行,linux – pp(PAR)在哪里解包添加(-a)文件?

这是我试图解决引发的无关问题

“Why don’t my system calls work in the Perl program I wrap with pp?”我在linux系统上创建了一个简单的Perl脚本:

new-net:~/scripts # cat ls_test.pl

@ls_out = `ls -l`;

map { print "$_\n" } @ls_out;

$out = `sh out_test.sh`;

print "$out\n";

此脚本调用一个简单的shell文件:

new-net:~/scripts # cat out_test.sh

echo "I'm here"

我使用pp将Perl脚本和shell脚本一起打包到ls_test中:

new-net:~/test # unzip -l ls_test

Archive: ls_test

Length Date Time Name

-------- ---- ---- ----

0 07-13-09 16:41 script/

436 07-13-09 16:41 MANIFEST

214 07-13-09 16:41 Meta.yml

93 07-13-09 16:41 script/ls_test.pl

538 07-13-09 16:41 script/main.pl

16 07-13-09 16:20 out_test.sh

-------- -------

1297 6 files

如果我在其他空目录中运行压缩文件,则找不到shell脚本:

new-net:~/test # ./ls_test

total 3391

-rwxr-xr-x 1 root root 3466177 Jul 13 16:41 ls_test

sh: out_test.sh: No such file or directory

如果我将shell脚本复制到目录中,则打包脚本将按预期运行:

new-net:~/test # ./ls_test

total 3395

-rwxr-xr-x 1 root root 3466177 Jul 13 16:41 ls_test

-rw-r--r-- 1 root root 16 Jul 13 16:20 out_test.sh

I'm here

那么,pp打包脚本在哪里可以找到包含的文件?如何在原始Perl脚本中配置对该包含文件的调用?

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值