Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Merging rows in awk

$
0
0
Hello,

I have a data format as follows:

Code:

Ind1 0 1 2
Ind1 0 2 1
Ind2 1 1 0
Ind2 2 2 0

I want to use AWK to have this output:

Code:

Ind1 00 12 21
Ind2 12 12 00

That is to merge each two rows with the same row names.

Thank you very much in advance for your help.

Viewing all articles
Browse latest Browse all 16232

Trending Articles