I have several files, each having two columns with some wrong data as large negative values.
file_1.txt
3 4
4 5
2 4
-10023 -9821
4 7
9 1
3 5
3 4
file_2.txt
6 2
4 5
2 4
-98323 -83432
-208932 4
7 17
20 3
20 2
file_3.txt
4 4
2 4
2 4
-129923 -1209923
2 3
12 3
2 4
7 1
I would like to print the maximum of the differences between the column 1 and column 2 in the above files without considering the wrong data. In simple way,
Maximum [ ($1 - $2) file*.txt ]
Desired output
ofile.txt
4
-1
-2
-99999
-1
9
17
18
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…