In the awk below I am trying to print out those lines in file2 that are no between $2 and $3 in file1 . Both files are tab-delimeted and I think it's close but currently it is printeing out the matches. The --- are not part of the files they are just to show what lines match or fall into
the range and don't need to be printed. Thank you :).
The above is what I am trying to do as each element is treated as a pair, so it. That is each $2 is combined with a $3 . Basically, the opposite of my code. I can seem to print the lines in the range, but not the lines not in the range. Thank you :).
You have confused the matter more. You are not looking at $3 in file2 so it can't possibly affect the output produced by your script. If you just want to reverse the output produced by your script change it to:
When reading the 1st input file, it creates empty array elements instead of assigning values to them (so you don't need space to store the strings you were assigning to those elements). When reading the 2nd input file, it checks to see if an element with the given index has been created instead of checking to see whether the value of the array element with that index has been assigned a non-empty string, non-zero value.