1

Egrep with exact words

view story
linux-howto

http://www.unix.com – Hi, I have the following data in a file bob bobby sam sammy ed eddie I need to grep these exact words: "bob", "sam", "ed". I don't want to see "bobby", "sammy", "eddie". egrep 'bob|sam|ed' gives me everything because egrep interprets these as a pattern. How can I specify an exact word? Thanks everyone. (HowTos)