276 reputation
2516
bio website linkedin.com/in/…
location
age
visits member for 3 years, 9 months
seen Dec 11 at 15:29

Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, what is the line of code shift $(($OPTIND - 1)) doing?
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, yep your new revision achieves the same thing my edits do and is a little cleaner than mine! good job. i'm gonna chalk that up to my inexperience of shell scripting =).
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, dash, in this context, is ubuntu's default shell? that is why your script specifies /bin/sh instead of /bin/bash?
Aug
29
revised How do you colorize only some keywords for a bash script?
deleted 8 characters in body
Aug
29
comment How do you colorize only some keywords for a bash script?
I changed the script a little to get the behavior I wanted.
Aug
29
revised How do you colorize only some keywords for a bash script?
added 519 characters in body
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, when I specify -b white the background color is actually gray instead of white. I think that is a function of my shell/OS/terminal... bash/fedora15/gnome-terminal is what I am using.
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, there is a problem with the script that does need to be fixed. when you omit the -b option it defaults to "black" background --> this should be fixed to be "no background is specified" instead of specifying a background color always (having a default background color of black would be good for when the user has a black background but would be bad for when the user has a white background).
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, really really good and impressive script IMO.
Aug
29
comment How do you colorize only some keywords for a bash script?
I ran your program and it does what is needed. Huzzah! But unfortunately I am not an awk guru so I find it hard to understand what is going on. Correct me where I am wrong. For each new line awk is run? The for loop in the awk source code is doing: "for all tokens in the line"? then it processes each token?
Aug
28
awarded  Teacher
Aug
28
comment How do you colorize only some keywords for a bash script?
An easy way to test is to make another script that echos text with the keywords "PASS" and "FAIL". That would then be called by this script.
Aug
28
comment How do you colorize only some keywords for a bash script?
I made this community wiki because my solution doesn't work.
Aug
28
answered How do you colorize only some keywords for a bash script?
Aug
28
asked How do you colorize only some keywords for a bash script?
Jul
8
awarded  Popular Question
Apr
24
awarded  Popular Question
Sep
28
awarded  Critic
Sep
19
accepted Where should I put a script that needs to execute once when the user logs in graphically?
Sep
19
comment Where should I put a script that needs to execute once when the user logs in graphically?
FYI, I edited the question to show "gnome 3".