GNU grep's new features

lfree發表於2006-06-05

grep changes quick reference

-Cx prints context lines before and after matches and must have argument x.

--color outputs matches in color (default red).

-D action specifies an action to take on device files (the default is "read").

--exclude= filespec excludes files matching filespec.

--include= filespec only searches through files matching filespec.

--label= name makes name the new label for stdin.

--line-buffered turns on line buffering.

-m X stops searching input after finding X matched lines.

-o outputs only matched patterns, not entire lines.

-P uses Perl-style regular expressions.

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-840261/,如需轉載,請註明出處,否則將追究法律責任。

相關文章