0
我正在從ant文件執行shell腳本。我想在日誌文件'buillog-perform.txt'中捕獲shell腳本的stdoutput。 以下是我對代碼的摘錄。我的完整版本很好。但是shell腳本都不會被執行,也不會在buillog-perform.txt文件中捕獲日誌。將ant腳本中的exec元素的輸出指向日誌文件
有人可以幫助我嗎?如何收集所有的輸出和錯誤,如果任何shell腳本到這個日誌文件?
注:我想要並行執行這個目標,因此使用spawn屬性。
<target name="perform"
description="This target for the perform.">
<exec dir="." executable="/bin/sh" spawn="true" output="buillog-perform.txt">
<arg line="-c './abc.sh -c ${arg1}'" />
</exec>
</target>
有在ANT EXEC任務的「輸出」屬性:請參閱:https://ant.apache.org/manual/Tasks/exec.html –