grep 使用参数 -f

1587阅读 0评论2010-02-10 crowsy001
分类:

参数说明
-f PatternFile
            Specifies a file containing search patterns. Each pattern should be separated by a new-line character, and an empty line is considered a NULL
            pattern. Each pattern is treated like a basic regular expression (BRE), unless the -E or -F flag is also specified.
 
sky@test:/home/sy>cat tt
12
23
*  hard nofile 355360
* soft nofile 355360
45
56
sky@test:/home/sy>cat cond
\*  hard nofile 355360
\* soft nofile 355360
sky@test:/home/sy>grep -f cond tt
*  hard nofile 355360
* soft nofile 355360
上一篇:认真
下一篇:强人语录