-2
如何將grep放在下面的字符串中。我似乎沒有把握好。在日誌文件中使用grep
p = subprocess.Popen(["tail", "-10", "/datax/qantas/run/tomcat/logs/localhost_access_log.2016-02-29.txt" "|" "grep /checkout-qantas/int/price?"], stdout=subprocess.PIPE)
給我
tail: cannot open /datax/qantas/run/tomcat/logs/localhost_access_log.2016-02-29.txt|grep /checkout-qantas/int/price?' for reading: No such file or directory
是否在Linux的shell命令的工作? – AlokThakur
我懷疑它會在linux shell上工作,究竟是什麼這個GET做的,從來沒有見過這樣的shell命令 – AlokThakur
嗨Alok,它爲我工作,它不是在linux shell中工作,但是當我使它在那裏工作時,它的執行我的Python腳本。謝謝。 –