grep 'something1 ' (space after 1) will match only that.
grep 'something1$' will match "something1" at the end of a line
grep 'something1[ $\.' (space, dollar sign and backspace period) will match "something1" followed by either a period, as in end of sentence, or a space, as in it is a word separated by a space, or at the end of a line.
Add a space to the front of 'something1 ' to match "something1" represented as a word separated by spaces.
It all depends on whast you are expecting.
Mark
Distribution Lists wrote:
Can anyone tell me the syntax for grep to grep and an exact match, rather than grep 'something1' and get 'something10', 'something11' etc...
Thanks
-- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list