看板 [ Linux ]
討論串[問題] 該怎麼設計讓shell script能寫入時間?
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者dyoll (lloyd huang)時間16年前 (2010/01/31 12:19), 編輯資訊
0
0
0
內容預覽:
time 是個 bash build in function. 所以你用正常的 command 導向. (redirections) 是取不到你要的資料的。. 測試如下.. lloyd@baby's bottle:$ time ls 1> /dev/null 2> /tmp/log. real 0m
(還有326個字)

推噓0(0推 0噓 1→)留言1則,0人參與, 最新作者CrazyRat (瘋老鼠)時間16年前 (2010/01/28 22:48), 編輯資訊
0
0
0
內容預覽:
我寫了一個shell script. 大致如下. #!/bin/sh. time ./test xxxxx > /dev/null. time ./test2 xxxxx > /dev/null. 然後把他存成一個run.sh. 接著執行run.sh. 我希望的結果是. 把time測出來的時間寫到一
首頁
上一頁
1
下一頁
尾頁