Reputation
369
Top tag
Next privilege 500 Rep.
Access review queues
Badges
2 8 23
Impact
~115k people reached

Jun
8
awarded  Popular Question
Jun
7
awarded  Popular Question
May
28
comment awk search for string containing forward slash in variable
@don_crissti btw your recommendation kinda works. I had to pass --color=never to grep (because I've aliased grep to use --color=always). Aside from that, it displays the first result twice followed by the second when there two occurrences of the search string.
May
28
comment awk search for string containing forward slash in variable
@don_crissti that is what I was looking for. Guess this one's a dupe.
May
28
asked awk search for string containing forward slash in variable
May
27
awarded  Excavator
May
27
revised Type URL and show HTTP status
Improved formatting
May
27
suggested approved edit on Type URL and show HTTP status
May
27
accepted Append something to each list in a file
May
27
comment Append something to each list in a file
It was meant as one. Can you explain the difference between the GNU version and the normal script?
May
27
answered Refer to a file under the same directory of a script found in $PATH
May
26
comment Append something to each list in a file
Short, sweet, and functional. I like it.
May
26
comment Append something to each list in a file
By the way, the condensed version has different parens at the beginning of the second line: if(/(list.)/) vs if(/list./). Does that affect anything?
May
26
comment Append something to each list in a file
I think the only lines that would need to be modified in the case that list1 is actually GoodDomains, list2 is actually BadDomains, etc. are 5 /list./; and 16 if(/list./). Maybe something like ^\([^[]*\)\(\[.*\) from @don_crissti's answer to capture everything up to the open bracket?
May
26
comment Append something to each list in a file
I take it file is lists.txt. How do the additional values get inserted?
May
26
suggested rejected edit on Append something to each list in a file
May
26
comment Append something to each list in a file
My brain just exploded into a million pieces.
May
26
answered Append something to each list in a file
May
26
comment Append something to each list in a file
@G-Man this solution can be abstracted. Please see my latest edit.
May
26
comment Append something to each list in a file
@terdon please see my latest edit.