Results 1 to 3 of 3
I used grep everyday. However, is there a parametes to grep an exact word. Let's say there is a word nelso, nels, nelson. If I grep "nels", it will show ...
- 12-01-2007 #1Linux Newbie
- Join Date
- Mar 2006
- Posts
- 101
grep exact letters
I used grep everyday. However, is there a parametes to grep an exact word. Let's say there is a word nelso, nels, nelson. If I grep "nels", it will show the three. Can I do a grep where it wil only display "nels" and not including nelson and nelso?
- 12-01-2007 #2Linux User
- Join Date
- Jun 2007
- Posts
- 318
Code:grep -w nels ...
- 12-01-2007 #3Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
If you use grep everyday you should have read the man page for it at least once. And especially if you want to know if it provides a facility you need.


Reply With Quote