Is there difference between:
egrep -w "word" filename
egrep "\bword\b" filename
or both are equal?
Is there difference between:
egrep -w "word" filename
egrep "\bword\b" filename
or both are equal?
Yes, they are same. For example, ‘\bFOO\b’
matches the separate word ‘FOO’:
grep -w 'FOO' input.txt
grep '\bFOO\b' input.txt