Re: [問題] .bat的問題

看板Linux作者時間17年前 (2009/02/24 18:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/3 (看更多)
※ 引述《allen0305.bbs@ptt.cc (Allen)》之銘言: : 想請問一下各位 : 我寫了兩個bat檔如下 : a.bat : ./run_program1 : ./run_program2 : b.bat : ./a.bat > output.txt & : 然後我執行b.bat : 原本預期是program_1和program_2會循序執行完 : 但是我看了output.txt : 他執行完program_1就結束了 : 想請問一下要怎樣才會兩個都執行呢? : 謝謝 應該是你在執行program1的時候有問題吧, 我自己做的測試都ok --a.sh-- #!/bin/bash echo abc echo def exit 0 ----------- --b.sh--- #!/bin/bash sh a.sh > out.txt exit 0 ---------- 成功得到out.txt裡的兩行輸出呢! 建議是script裡的command都寫完整路徑吧。 -- 我不是 但我想飛 -- 未來最舊小棧 Oldest Future Object █▇█˙通訊頻率 OfO.twbbs.org ◢▉◤ ◆來源座標 140.116.252.45
文章代碼(AID): #19eyLU00 (Linux)
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 3 篇):
文章代碼(AID): #19eyLU00 (Linux)