shell script 問題 - Linux

By Hazel
at 2018-08-28T21:53
at 2018-08-28T21:53
Table of Contents
最近被指派到一項工作
我想用 script 來完成
因為我需要執行一個程式
這個程式會慢慢吐現在執行的結果
我必須根據最後的結果做不同的處理
例如在script內:
file=`ls -l`
可以取得檔名
但執行這個script時畫面
當時的畫面並不會也顯示ls的結果..
請問有方法可以讓我在file取得命令的結果
又可以顯示在畫面上嗎?
因為我執行那隻程式要跑很久
我想要觀看目前跑的進度
所以沒辦法最後用echo出來
謝謝
--
我想用 script 來完成
因為我需要執行一個程式
這個程式會慢慢吐現在執行的結果
我必須根據最後的結果做不同的處理
例如在script內:
file=`ls -l`
可以取得檔名
但執行這個script時畫面
當時的畫面並不會也顯示ls的結果..
請問有方法可以讓我在file取得命令的結果
又可以顯示在畫面上嗎?
因為我執行那隻程式要跑很久
我想要觀看目前跑的進度
所以沒辦法最後用echo出來
謝謝
--
Tags:
Linux
All Comments

By Kelly
at 2018-08-29T15:38
at 2018-08-29T15:38

By Frederic
at 2018-09-03T11:27
at 2018-09-03T11:27

By Mason
at 2018-09-08T01:12
at 2018-09-08T01:12

By Margaret
at 2018-09-12T15:30
at 2018-09-12T15:30

By Candice
at 2018-09-15T22:16
at 2018-09-15T22:16
Related Posts
linux要如何建立uefi的boot?

By Poppy
at 2018-08-28T14:59
at 2018-08-28T14:59
make install 後的檔案搜尋問題

By Selena
at 2018-08-27T21:38
at 2018-08-27T21:38
linux要如何建立uefi的boot?

By Hamiltion
at 2018-08-27T17:19
at 2018-08-27T17:19
linux要如何建立uefi的boot?

By Eden
at 2018-08-27T12:51
at 2018-08-27T12:51
putty遠端登入後權限

By Rebecca
at 2018-08-24T22:00
at 2018-08-24T22:00