How do I highlight certain word using the cat command on the terminal?
1 Answer
Type cat (the name of your textfile) | grep (The word you want to highlight), e.g cat textfile | grep in.
- 2This would only work if grep is aliased with --color. In addition, it is not needed to cat and then grep, you can just
grep some_word textfileZumo de Vidrio– Zumo de Vidrio2017-01-25 13:59:17 +00:00Commented Jan 25, 2017 at 13:59 - To be fair, the question requires the use of cat :)dhag– dhag2017-01-25 14:32:02 +00:00Commented Jan 25, 2017 at 14:32