Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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

share|improve this answer
    
Thank you!! Works perfectly! –  Bannix Sep 23 '12 at 14:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.