I have the following file
A B C D E F G
- - - - - - -
1 2 3 4 5 6 7
1 3 3 4 8 6 8
I want to compare lines 2 and 3 column by column, and print the complete column when those two values are different.
In this case, the intended output would be
B E G
- - -
2 5 7
3 8 8
Is there a way to do that using awk or nawk?
The input file will always have 4 lines, but can have as many as 30 columns. I just want to be able to show the columns where the values changed.
Thanks
Jalr2003
A B C D E F G
- - - - - - -
1 2 3 4 5 6 7
1 3 3 4 8 6 8
I want to compare lines 2 and 3 column by column, and print the complete column when those two values are different.
In this case, the intended output would be
B E G
- - -
2 5 7
3 8 8
Is there a way to do that using awk or nawk?
The input file will always have 4 lines, but can have as many as 30 columns. I just want to be able to show the columns where the values changed.
Thanks
Jalr2003