Hello;
i have 2 file that each of them contain many records such as below:
file1
2006/01/01 12:36:49.3 37.902 48.482 0.0 1136119009
2006/01/01 13:16:22.9 34.933 46.292 2.0 1136121382
2006/01/01 13:54:33.2 37.762 48.163 18.8 1136123673
2006/01/01 14:32:9.1 37.739 48.330 23.2 1136125929
2006/01/01 21:14:32.4 36.986 46.063 18.0 1136150072
file2
2006/01/01 13:16:05.36 34.6370 46.8597 10.0 1136121379
2006/01/06 06:59:02.10 39.4099 44.6065 10.0 1136530742
2006/01/06 13:49:52.70 38.5481 40.7437 6.0 1136555392
2006/01/13 04:57:18.04 38.2197 47.8743 10.1 1137128238
2006/01/16 09:18:05.17 34.7801 45.0857 10.0 1137403085
now i want to compare each records of file1 with the whole lines of file2 and print both line of file1 and file2 which has these circumstances:
1-1st field of file1 must be equal to 1st field of file2
2-abslute difference value between 6th field of both file must be less than 5
3-abslute difference value between 3th field of both file must be less than 1
4-abslute difference value between 4th field of both file must be less than 1
i tried
NR=FNR
but i can't put circumstances in proper palace.
so for this example the output will be:
file3
2006/01/01 13:16:22.9 34.933 46.292 2.0 1136121382 2006/01/01 13:16:05.36 34.6370 46.8597 10.0 1136121379