關於用Shellscript處理連續檔案的問題 - Linux

By Mia
at 2011-09-12T07:12
at 2011-09-12T07:12
Table of Contents
在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
可以完成
但想請教一下有沒有更快的辦法
感謝
--
Tags:
Linux
All Comments

By Edward Lewis
at 2011-09-14T10:47
at 2011-09-14T10:47

By Hedwig
at 2011-09-15T19:47
at 2011-09-15T19:47

By Anonymous
at 2011-09-16T00:39
at 2011-09-16T00:39

By Zora
at 2011-09-20T00:13
at 2011-09-20T00:13

By Hedy
at 2011-09-20T09:35
at 2011-09-20T09:35
Related Posts
khq 區網病毒的解法

By Joe
at 2011-09-12T02:52
at 2011-09-12T02:52
cacti改時間軸

By Dorothy
at 2011-09-11T16:09
at 2011-09-11T16:09
關於 fetchmail 擷取郵件的時間

By Ivy
at 2011-09-11T11:57
at 2011-09-11T11:57
安裝玩以後可以轉移/boot嗎?

By Dinah
at 2011-09-10T21:34
at 2011-09-10T21:34
Debian有中文介面嗎?

By Daniel
at 2011-09-10T20:11
at 2011-09-10T20:11