We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Linux Shell
- Grep Sed Awk
- 'Grep' #1
- Discussions
'Grep' #1
'Grep' #1
Sort by
recency
|
79 Discussions
|
Please Login in order to post a comment
Try this people
grep -w 'the'
grep -w "the"
-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. This option has no effect if -x is also specified.
grep "\bthe\b"
Also you can use
grep "\<the\>"