Timeline for Text processing - join every two lines with commas
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 14 at 12:35 | comment | added | Ed Morton |
It's also more verbose than necessary and testing the same condition twice unnecessarily, it should just be awk 'NR%2{printf "%s,", $0; next} 1' *file* to be more concise and robust.
|
|
| Oct 19, 2012 at 9:54 | comment | added | manatwork |
Maybe because the lazy printf? Will fail in the rare case when a station name contains a format specifier. (See pastebin.com/wgxFttrJ for an example.) But this is just a guess, the downvote is not from me.
|
|
| S Oct 19, 2012 at 9:03 | history | suggested | lurker | CC BY-SA 3.0 |
@bernhard: remove the whitespace after the comma at {printf $0", "} and this becomes a solid answer.
|
| Oct 19, 2012 at 9:01 | review | Suggested edits | |||
| S Oct 19, 2012 at 9:03 | |||||
| Oct 18, 2012 at 20:38 | comment | added | Bernhard | @downvoter: What is wrong with my answer to deserve a downvote? How can it be improved? | |
| Oct 18, 2012 at 11:11 | history | answered | Bernhard | CC BY-SA 3.0 |