享樂生活 生活想樂
2010年8月10日 星期二
c shell 測試檔案/逐行讀取
測試檔案讀取 exist時$?==0
--
test -r 123.log
echo $? "yes"
endif
從檔案中逐行讀取 (檔案中是以空白作為分隔變數)
--
foreach line ( "`cat inv_wrf.txt`" )
echo $line
end
1 則留言:
毛小孩日誌
2010年8月10日 凌晨3:00
http://www.linuxquestions.org/questions/programming-9/csh-while-read-738708/
回覆
刪除
回覆
回覆
新增留言
載入更多…
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
http://www.linuxquestions.org/questions/programming-9/csh-while-read-738708/
回覆刪除