Matching Whole Word in Grep
November 7th, 2006 liewsheng Posted in Text Manipulation, grep | Hits: 14129 |
Is “grep” capable to match a whole word? The answer of cause is yes!!
grep -w "keyword" filename
this will only display the line with matching word. Using the file contents in previous example, if this command enter:
grep -w "ates" filename
you will get:
ates, 953645
Live Chat!







Leave a Reply