Is it possible to have grep search for multiple expressions, but only colour a specific one of them?
Example of what I'm after:
cat file | grep -e foo --colour -e bar
Output (where bold represents coloured):
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community