Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
perl将perl一行程序和脚本组合在一个bash脚本中_Bash_Perl - Fatal编程技术网

perl将perl一行程序和脚本组合在一个bash脚本中

perl将perl一行程序和脚本组合在一个bash脚本中,bash,perl,Bash,Perl,我尝试了以下方法,但没有成功: wrapper.pl脚本: marcmoose-lint unimarc.rules marc.iso perl -ne 'if (/^([0-9]{3})[()0-9]*: *(.*)$/) { print "$1: $2\n";}' marc.iso.log | sort | uniq -c perl script1.pl perl script2.pl filename.txt perl script3.pl 我如何制作上述所有脚本 my $command

我尝试了以下方法,但没有成功: wrapper.pl脚本:

marcmoose-lint unimarc.rules marc.iso
perl -ne 'if (/^([0-9]{3})[()0-9]*: *(.*)$/) { print "$1: $2\n";}' marc.iso.log | sort | uniq -c
perl script1.pl
perl script2.pl filename.txt
perl script3.pl
我如何制作上述所有脚本

my $command = "perl s1.pl in.fa > out1.txt";
system($command);

$command = "perl s2.pl out1.txt > out2.txt";
system($command);

$command = "perl s3.pl out2.txt > out3.txt";
system($command);

被插入到单个可执行脚本中,即run.sh?

显示一堆不按您希望的方式工作的代码并不能确切地告诉我们您的实际意图。A将更有用。至少,我们需要(1)知道您想要什么,(2)知道您得到了什么,以及(3)拥有测试答案是否能解决这个问题所需的一切。目标语言是perl还是bash?如果是bash,那就很简单了,只需在script中复制命令我会很感激这两个命令,但这两个命令中的任何一个都可以实现。另外,我制作了一个bash脚本,很简单,谢谢
marcmoose-lint unimarc.rules marc.iso
    perl -ne 'if (/^([0-9]{3})[()0-9]*: *(.*)$/) { print "$1: $2\n";}' marc.iso.log | sort | uniq -c
    perl script1.pl
    perl script2.pl filename.txt
    perl script3.pl
use autodie qw( system );

system(q{marcmoose-lint unimarc.rules marc.iso});
system(q{perl -ne 'if (/^([0-9]{3})[()0-9]*: *(.*)$/) { print "$1: $2\n";}' marc.iso.log | sort | uniq -c});
system(q{perl script1.pl});
system(q{perl script2.pl filename.txt});
system(q{perl script3.pl});