Re: [問題] 關於用Shellscript處理連續檔案的問題
謝謝各位的回覆
那如果要grep 'keyword' test_01.out >> result_01
grep 'keyword' test_02.out >> result_02
如此類推,請問有沒有更快的方法?
感謝
※ 引述《manquentin (明天會更好)》之銘言:
: 在linux下用shellscript處理連續的檔案時
: 如果檔案共有10個檔名分別為
: test_01.out
: test_02.out
: test_03.out
: test_04.out
: test_05.out
: test_06.out
: test_07.out
: test_08.out
: test_09.out
: test_10.out
: 然後我想用grep來抓出每個檔案都含有keyword的那一行
: 按檔名01到10的順序寫到result檔案中
: 但有10個檔案,我知道用10次 grep 'keyword' test_01.out >> result
: 可以完成
: 但想請教一下有沒有更快的辦法
: 感謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 99.172.3.251
推
09/12 11:49, , 1F
09/12 11:49, 1F
→
09/12 12:53, , 2F
09/12 12:53, 2F
→
09/12 13:06, , 3F
09/12 13:06, 3F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):