Tagged Questions
3
votes
1answer
73 views
How can I keep color codes with grep input?
It I grep something twice:
... | grep foo | grep bar
It seems foo is not highlighted.
Infact, it seems grep removes colorcodes from its input; Any way to prevent this?
1
vote
1answer
92 views
Sorting by one column then the
Say i have a output file with following:
010513 08:04 ROUTER1 192.168.1.1 68.130.5.10 HIT(1)
010513 08:04 ROUTER1 172.168.1.1 28.130.5.10 HIT(1)
010513 08:04 ROUTER1 122.168.1.1 ...
4
votes
3answers
391 views
Mark occurrences of keyword with a different color
I have a program which spits out an output to stdout like:
[OK] Something is ok
[OK] Something else is also ok
[FAIL] This does not look good
[FAIL] Neither does this
[OK] At ...
2
votes
1answer
335 views
grep --color adds ANSI code ESC[K - This can change displayed text
Why does grep add ANSI code \e[K to its colored output? I can't see the point of it, but obviously the developers can. It is an ANSI/VT100 Terminal code which is used to "Clear line from current ...
4
votes
3answers
793 views
Grep_color on mac
I am trying to get my regex highlighted on mac using terminal. I have put this is my .profile:
export GREP_COLOR='1;30;40'
Nothing changes, so I added the same to my bash.profile still nothing, ...
3
votes
1answer
532 views
git grep colors differ from grep custom colors
I've setup grep colors in my ~/.bashrc :
export GREP_COLORS='ms=01;34:mc=01;34:sl=:cx=:fn=35:ln=32:bn=32:se=36'
They work for
grep --color=auto
grep --color=always
Unfortunately, those custom ...
14
votes
7answers
594 views
Pimp my GNU grep
I have seen on some Linux, grep is configured to highlight the match, and print the matching file.
How do you configure GNU grep best?