在script中從標準輸入讀東西 - Linux
By Wallis
at 2011-05-12T17:51
at 2011-05-12T17:51
Table of Contents
我知道可以用$<:q
一行一行的讀標準輸入的東西
但是假如 我用 cat tempfile | ./myscript 時
我要怎樣知道已經讀完了?
原本是想說判斷是不是沒東西
但是假如tempfile有空白行就又行不通
不知道有沒有人知道怎樣判斷標準輸入結尾了> <
感激不盡
--
Tags:
Linux
All Comments
By Noah
at 2011-05-14T09:07
at 2011-05-14T09:07
By Charlie
at 2011-05-17T23:51
at 2011-05-17T23:51
By Edwina
at 2011-05-21T23:48
at 2011-05-21T23:48
By Oliver
at 2011-05-26T14:52
at 2011-05-26T14:52
Related Posts
LinuxMint 11 "Katya" RC
By Liam
at 2011-05-12T16:59
at 2011-05-12T16:59
觸控版,螢幕開機黑屏,電力顯示,FX安裝
By Kama
at 2011-05-12T11:29
at 2011-05-12T11:29
Putty 下載檔案問題
By Elvira
at 2011-05-12T11:20
at 2011-05-12T11:20
被吃掉的title bar
By Andy
at 2011-05-12T01:20
at 2011-05-12T01:20
Error 18: selected cylinder exceeds maximum supported by
By Mason
at 2011-05-11T21:59
at 2011-05-11T21:59