1

Match number from 2 input files

view story
linux-howto

http://www.unix.com – I have 2 input files; file1: 1 1000 2000 x1 1 5000 7000 x5 1 8000 10000 x8 file2: 1 1000 x1 z1 2 1001 x2 z2 1 1999 x3 z3 2 2000 x4 z4 1 2001 x5 z5 1 2002 x6 z6 1 6100 x7 z7 1 6200 x8 z8 1 7500 x9 z9 2 8500 x10 z10 I want to get the output look like this output file: 1 1000 x1 z1 1 1999 x3 z3 1 6100 x7 z7 1 6200 x8 z8 In summary : output came from the value of column 1 in file 2 is match with column 1 in file 1 ,then if the value in column 2 of file 2 is in between column 2 and column 3 of file 1 then all data in that line should be keep, otherwise take it out. Please help me!!!! (HowTos)