I have this line using awk:
$ awk '{
for (i=1;i<=NF;i++){
if ($i+0 != $i)
$i = temp[i]+0.00
temp[i]=$i+0.00
}}1'
In short, this converts every word to the last seen number of that column.
THE PROBLEM
The issue is that the decimals place of every value that comes out of $i = temp[i]+0.00 loses its decimals precision.
For example,
-ERROR -1.57 -2.02
-2.10 2.70 ERROR
-4.70 ERROR -0.52
-2.20 ERROR -0.02
-2.20 -1.50 ERROR
Turns into:
0 -1.57 -2.02
-2.10 2.70 -2.02
-4.70 2.7 -0.52
-2.20 2.7 -0.02
-2.20 -1.50 -0.02
2.70 would become 2.7 and so every word that directly follows 2.70 would not be turned into 2.70, but instead into 2.7. How can you force awk to save a float value to a set amount of decimal places?
Obviously, +0.00 didn't help.