This was discussed in:
thread822-1189907
I'm using FreeBSD-7.1-STABLE. I can't get grep to use boundaries like \< and \>.
I have a file, /etc/mail/access, that has IP addresses followed by tab, and configuration information. The format is like this:
11.22.33 SOME CONFIG DIRECTIVE
Now, what I'm trying to do is grep for a specific IP address, not similarities.
For example, grep will pick up:
11.22.33
11.22.3
From what I read, I should be able to do something simple like this:
grep '\<11\.22\.3\>' /etc/mail/access
or some variation thereof, and it does not work.
I'm really puzzled by this one. fgrep and it's relatives don't return the expected result, either.
Can someone point out what I'm missing here.
Thanks.
thread822-1189907
I'm using FreeBSD-7.1-STABLE. I can't get grep to use boundaries like \< and \>.
I have a file, /etc/mail/access, that has IP addresses followed by tab, and configuration information. The format is like this:
11.22.33 SOME CONFIG DIRECTIVE
Now, what I'm trying to do is grep for a specific IP address, not similarities.
For example, grep will pick up:
11.22.33
11.22.3
From what I read, I should be able to do something simple like this:
grep '\<11\.22\.3\>' /etc/mail/access
or some variation thereof, and it does not work.
I'm really puzzled by this one. fgrep and it's relatives don't return the expected result, either.
Can someone point out what I'm missing here.
Thanks.