Dear All,
Good Day. I would like to hear your suggestions for the following problem:
I have a file with 5 columns with some numbers in 16 lines as shown below.
Input file:
Col 1 Col 2 Col 3 Col 4 Col 5
12 220 2 121 20
234 30 22 9 156
25 129 320 94 7
.
.
.
.
I need to do the following
Col_1new= Col1 ~ Col2 (# difference between Col1 and Col2)
Col_2new= Col2 ~ Col3
Col_3new= Col3 ~ Col4
and so on.
I need the output will be like this
Col_1new Col_2new Col_3new Col_4new
208 218 119 101
and so on. The output should be in the column format. I am looking for an awk program to do the same. If anyone help me in this regard.
Thanks in advance.
Warm regards
Fredrick.