shell scripts 和 VMS submit? - Linux

Table of Contents


想請教各位高手一個問題:

以往我使用的linux系統上有一個submit的指令,
這個指令好像是從VMS時代遺留下來的,
可以讓我執行批次檔(batch file),
並將過程直接寫到一個.log檔案裡去。

這樣的概念我相信是對應到一般linux裡的shell scripts,
但請問要如何將shell scripts的執行過程(如sh -x filename的結果)寫到.log檔?

感激不盡!

--

All Comments

Victoria avatarVictoria2010-05-20
./abc.sh &> log
Andy avatarAndy2010-05-21
但是有可能會出現亂碼...
Xanthe avatarXanthe2010-05-23
FreeBSD 有 tee 指令... linux 不知道有沒有...
Victoria avatarVictoria2010-05-27
有的,用tee的方式導向輸出到兩個output