1
为什么这行Perl会中断?如何在Perl的system()中使用shell的进程替换?
system("paste <\(cut -f2 $file \) $file2 > $fileout");
什么是正确的做法呢?
为什么这行Perl会中断?如何在Perl的system()中使用shell的进程替换?
system("paste <\(cut -f2 $file \) $file2 > $fileout");
什么是正确的做法呢?
这通常是因为Perl使用sh而不是bash来执行系统命令。快速回答是在命令开始时包含bash -c。更好的答案在这里: