I have 2 files,File 1:472File 2:1 5 Alpha6 10 Bravo11 15 Charlie16 21 Delta22 30 EchoI want to compare every entry in file 1 if it lies between col 1 and col 2 of file 2 (should be checked for entire file 2) and if it matches, it should print respective col 1 of file 1 and column 3 of file 2. I tried using,paste file1 file2 | awk '$1>$2+0 && $1<$3+0 {print $1,$4}'But doesn't appears to be working.When running,paste file1 file2 | awk '{print $1}'It outputs as,4721622paste command combines both file and couldn't differentiate files. 
Compare 2 Files if it falls between a range of numbers
bash;text processing;sed;awk
You can try following awk:awk 'NR == FNR { x[$1] = $1+0; next; } { for (i in x) { if (x[i] > $1+0 && x[i] < $2+0) { print x[i], $3; } } }' file1 file2Result should be:4 Alpha2 Alpha7 Bravo