See man grep. It looks like the -x switch will do what you want.
>>> Lucy Premus <lpremus AT METLIFE DOT COM> 01/08/99 02:41pm >>>
Theres probably a very simple answer to this question, but I cannot for
life of me figure it out. How do you grep for an EXACT match of a string?
I have a file that looks something like this:
10.12. #White Plains
10.16. #One Penn Plaza
10.17. #Mt. Prospect
I'm trying to grep for the exact match of 10.1. in a script. That string
will actually be in a variable defined previously in the script.
When the grep runs, it not only outputs the line 10.1. #Bridgewater
(which is what I want), but it gives me every other line
containing 10.1?. How do I prevent that from happening? I've tried
putting single quotes, double quotes, etc around the variable
name, but have had no success. Am I missing something simple