0

How do I highlight certain word using the cat command on the terminal?

0

1 Answer 1

-1

Type cat (the name of your textfile) | grep (The word you want to highlight), e.g cat textfile | grep in.

2
  • 2
    This 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 textfile Commented Jan 25, 2017 at 13:59
  • To be fair, the question requires the use of cat :) Commented Jan 25, 2017 at 14:32

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.