I have data like this:
A
B
C D
E
F
G
H I
I want it to look like this:
A,B,C
D,E,F
G,H,I
How can I achieve this using command-line tools?
This question has each data-cell on its own line: How to convert rows to columns in unix
I have data like this:
A
B
C D
E
F
G
H I
I want it to look like this:
A,B,C
D,E,F
G,H,I
How can I achieve this using command-line tools?
This question has each data-cell on its own line: How to convert rows to columns in unix
Following command could help you.
xargs -n 3 < Input_file | tr ' ' ','