If you’d like your search terms to be more visible when you use the grep command, you can use an alias like this. It will put the term that you’re looking for in a different color so that you can spot it more easily on each line of text.
$ alias grep='grep --color=tty' $ grep dark beerlist Granny's very dark ale
This trick will also make it fairly obvious if you’re only finding the string that you’re looking for when it’s part of a longer word.
Read more on using grep:
- Taking advantage of the grep command’s many options
- 2 grep commands that will help you find whole words
- The many faces of the Linux grep command
- How To: Grep tricks for Linux users
- Groping through big data with grep
- How to use the grep command
- How to use the grep command to cheat in Wordle: 2-Minute Linux Tips
- The best tools and techniques for finding data on Unix systems




