顯示具有 grep 標籤的文章。 顯示所有文章
顯示具有 grep 標籤的文章。 顯示所有文章

2013年5月7日 星期二

grep -o(--only-matching)




 -o, --only-matching
              Show only the part of a matching line that matches PATTERN.

2013年2月24日 星期日

grep -w(--word-regexp)




-w--word-regexp
Select only those lines containing matches that form whole words. The test is that the matching substring must either be at the beginning of the line, or preceded by a non-word constituent character. Similarly, it must be either at the end of the line or followed by a non-word constituent character. Word-constituent characters are letters, digits, and the underscore.