How can I grep exactly a string that has .,/ characters using grep?
Example: I want to grep ONLY string1 and not string1.more or string1.more.evenmore
#lsauth ALL|grep 'string1'
All output:
string1 <--- This is the only I want.
string1.more
string1.evenmore.
more.string1
evenmore.string1.more
thanks in advance.
regards
Israel.
lsauth ALL | egrep '^string1$'
Hi bartus11
umm.. doesn't work for me...
I'm testing on AIX 6.1. When I run the command it does not return any output.
regards,
Israel.
Hi
#lsauth ALL|grep 'string1[^.]'
Guru.
Maybe there is space after or before "string1"? Try
lsauth ALL | egrep '^string1 $'
or
lsauth ALL | egrep '^ string1$'
Anyway real output generated by "lsauth" would be much more helpful.