CHR SNP UNADJ BONF HOLM * * * etc.
19 SNP_A-2236481 1.742e-26 5.442e-21
13 SNP_A-4204405 8.643e-07 1.505e-06
3 SNP_A-1860908 4.483e-06 7.279e-06
7 SNP_A-1990194 7.434e-06 1.181e-05
*
*
*
etc. (thousands of rows)
Note: file2 also contains the entries listed in file1
Question: I'm using grep -w -f file1 file2 > file3 to match in file2 only the entries listed in file1, BUT this does not work ; the output file3 is giving me everything listed in file2 :(.
To keep the forums high quality for all users, please take the time to format your posts correctly.
First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags
```text
and
```
by hand.)
Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.
Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.
mark54g:
Could it be that grep is limited to certain line numbers. When I had close to 1/2 million columns I did not have a problem. BUT, now that I have that many rows, grep does not seem to work.
treedroppings:
Yes I have tried the man pages since I know very little about unix.