if the column1 and 2 in both files has same key (for example "a" and "a1") compare each first key value(a1 of a) of input2 (for example 1-4 or 65-69 not 70-100 or 44-40 etc) with all the values in input1.
if the range of first key value in input2 is outof range in input1 values named it as out of range1 or vice versa.
some of the key values in input2 are in descending order and some are in ascending order. based on these order we have to name them accordingly as I shown below.
If it seems complicated and time consuming please give me any basic idea or approach to compare ranges of 2 files
Help would be appreciated
input1
a a1 5-10
30-40
45-60
80-90
100-120
input2
a a1 1-4
a a1 4-1
a a1 120-140
a a1 140-120
a a1 65-69
70-100
a a1 70-65
44-40
a a1 30-33
37-57
63-83
a a1 85-81
30-25
b b1 100-200
c c2 1-200
d d3 2-333
output
a a1 1-4 outofrange1
a a1 4-1 outofrange2
a a1 120-140 outofrange3
a a1 140-12 outofrange4
a a1 65-69 inrange1
70-100
a a1 70-65 inrange2
44-40
a a1 30-33 inrange3
37-57
63-83
a a1 85-81 inrange4
30-25
---------- Post updated at 01:34 AM ---------- Previous update was at 12:21 AM ----------[COLOR="\#738fbf"]
---------- Post updated at 01:35 AM ---------- Previous update was at 01:34 AM ----------
If it seems complicated and time consuming please give me any basic idea or approach to compare ranges of 2 files