Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

How to compare two files ?

$
0
0
Hi am just trying to compare two files data...

datafile1 is standard data, datafile 2 is varying

Code:

st_data.txt

       
Code:

       
long      lat
68.14    23.48
67.56    22.99
67.08    22.49
66.79    22.25
66.68    22.18
66.07    21.89
65.67    21.65
65.6    21.56



Code:

un_std.txt
long    lat
75.5    10.05
75.02    10.15
74.52    10.23
74.02    10.33
73.45    10.43
73.15    10.48
2.1    10.55
74.15    8.9
72.73    10.53
72.98    10.43
73.52    10.23

here I want to compare like this

Code:

if un_std data file's long and lat is less than or equal to std_data file's long and lat write "YES"(within region) to particular row else "NO"(outside region) corresponding row,

here I want to cross check a single entry of un_std file with all entry's of std_file if condition meets, then to write yes or no


Attached Files
File Type: txt un_std.txt (2.4 KB)
File Type: txt st_data.txt (4.2 KB)

Viewing all articles
Browse latest Browse all 16232

Trending Articles