if you don't mind merged stdout/stderr then ./aaa.sh |& tee aaa.log works (in bash). – jfs. Sep 3, 2013 at 6:50. 6. @Stefaan I believe you can retain exit ...
確定! 回上一頁