How to show only whole words with grep on Linux when searching a file.

Some very useful grep tips for a UNIX or Linux user This is a very useful example, this is how to stop grep finding letters before the start of the search term “file*[s-t]”. The \b operator is an end of word marker. ┌──[[email protected]]─[~] └──╼ ╼ $ grep -n "\bfile*[s-t]\b" /usr/share/dict/words 46437:files 46438:filet 46439:filet’s┌──[[email protected]]─[~] └──╼ ╼ … Read more