我在Perl .pl文件中有以下代碼。你覺得有這個代碼的任何問題(我不明白怎麼會在2號線的工作有一個「|」它後面沒有命令字符)Perl代碼 - 管道「|」在`open()`語句中
while ($temp ne "") {
open(PS, "ps -ef | grep deploy.sh | grep ssh | grep -v grep|");
$temp = <PS>;
close(PS);
print "The Deploy scripts are still running. Now sleeping 20\n";
sleep 20;
}
爲什麼它的價值是一種用'ps -ef | grep進程| grep -v grep'是'ps -ef | grep [p] rocess'。 – pilcrow 2014-11-23 04:01:14