grep -w 'word' file.txt

Category: Text Processing

grep -w 'word' file.txt

Match whole words only

Matches only complete words. 'cat' would match 'cat' but not 'catch' or 'concatenate'.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.