241 reputation
19
bio website
location Israel
age 29
visits member for 2 years, 11 months
seen Dec 21 at 9:16

This is my profile
This is where I answer my questions
It's a natural grace
Of watching new users shape
It's in minor keys
Solutions and remedies
Enemies becoming friends
When bitterness ends
This is my profile


Jun
16
awarded  Caucus
Dec
16
comment After upgrading the kernel, the sound no longer works
Have you tried all the non-linuxy things already? Speakers are indeed working? Have you tried another set? Changed cables?
Dec
13
revised Multicolored Grep
added 802 characters in body; edited tags
Dec
13
awarded  Critic
Dec
13
awarded  Teacher
Dec
12
awarded  Yearling
Dec
10
comment Multicolored Grep
@l0b0 I've updated my post. It's slightly modified from the original version. Thanks for your help so far!
Dec
10
revised Multicolored Grep
updated code, explinations and added images
Dec
9
comment Multicolored Grep
Oh, and FYI - I only confused your cursor in the screenshot for my mouse 5 times..
Dec
9
awarded  Commentator
Dec
9
comment Multicolored Grep
I was hoping to still be able to use the actual grep command. In the field, I would be inserting all sorts of other logic into my one-liner that your script can't support as it needs to take all of the queries at once.
Dec
9
comment Multicolored Grep
Thanks for your contribution! Your script works as advertised :P
Dec
9
comment Multicolored Grep
However both of our solutions suffer from the same problem; When doing multiple pipes, only one color is used. Only by manually specifying each color (as I have done in my first snippet) is the output using more than one color.
Dec
9
comment Multicolored Grep
Thanks for your input! I've incorporated your grep "$@" suggestion - that sorted out the alias to run the function and then grep.
Dec
9
awarded  Nice Question
Dec
9
comment Multicolored Grep
@Emmanuel - Yes, but I would like to know why that specific line is being processed IE - what grep command matched against it.
Dec
9
revised Multicolored Grep
deleted 1 characters in body
Dec
9
comment Multicolored Grep
Oh - and yea.. silly typo there with COLOR_TOGGLE. Thanks for catching it :)
Dec
9
comment Multicolored Grep
The only variables that really need to be maintained are COLOR_INDEX and GREP_COLORS. I tried exporting these at the end of the function without success. Is that what you meant? Simply to have export VAR, right?
Dec
9
comment Multicolored Grep
@Bernhard - If I'm able to insert my GREP_COLORS parameter before the grep command, I could also add --color=always to ensure it'll work even after several pipes.