6

I've got a problem with Xterm.

When I use the command

tail -F example.log | grep -a -i -e 'examplestring'

in Xterm the "grepped" strings aren't highlighted in red like they would be in the normal terminal.

How can I fix this? Google didn't help me very much.

Peachy
  • 7,235
  • 10
  • 40
  • 47
Bannix
  • 61

1 Answers1

4

Open terminal ( Ctrl + Alt + T ) and type

export GREP_OPTIONS='--color=auto'. This will highlight the matched pattern of grep

To set it to Red color use: export GREP_COLOR='1;31'

For more color options check out this page

enter image description here

devav2
  • 37,290