Reputation
6,416
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
8 52 88
Impact
~583k people reached

22m
answered How to add a header or footer to a sed or awk stream?
57m
revised How to add a header or footer to a sed or awk stream?
added 264 characters in body
1h
asked How to add a header or footer to a sed or awk stream?
1h
comment How to use awk to indent a source file based on simple rules?
That's great! I added an extra space for a two space indent.
1h
revised How to use awk to indent a source file based on simple rules?
added 259 characters in body
1h
asked How to use awk to indent a source file based on simple rules?
Aug
24
awarded  Notable Question
Aug
22
revised How to display the distro name (only) from lsb_release -i
edited title
Aug
22
awarded  Yearling
Aug
19
revised What color codes can I use in my PS1 prompt?
added 55 characters in body
Aug
19
awarded  Famous Question
Aug
18
revised How to copy contents of a (large) vim file to the OSX system clipboard to paste in other apps?
added 105 characters in body
Aug
18
accepted How to copy contents of a (large) vim file to the OSX system clipboard to paste in other apps?
Aug
18
accepted sed - how to remove all lines that do not match
Aug
18
accepted Join pattern line and consecutive non-empty lines, separated by commas and enclosed in ()
Aug
18
comment Join pattern line and consecutive non-empty lines, separated by commas and enclosed in ()
How about: awk '{if($0=="select"){getline n;getline n2; printf "%s(%s, %s)\n", $0, n, n2}else{print}}' for the multi-line. Not sure how to combine the two.
Aug
18
comment Join pattern line and consecutive non-empty lines, separated by commas and enclosed in ()
thanks but -r not available on osx (tagged and noted in question)
Aug
18
comment Join pattern line and consecutive non-empty lines, separated by commas and enclosed in ()
Additional condition added at bottom.
Aug
18
revised Join pattern line and consecutive non-empty lines, separated by commas and enclosed in ()
added 100 characters in body
Aug
18
comment Join pattern line and consecutive non-empty lines, separated by commas and enclosed in ()
This is great! Is there any way it could handle multiple lines ? (see updated example)