I have a binary file which looks like this,
Orthogroup A B C D E F
OG0000000 1 1 1 0 0 0
OG0000001 1 1 1 0 0 0
OG0000002 1 1 1 0 0 0
OG0000003 1 1 1 0 0 0
OG0000004 0 0 0 1 1 0
OG0000005 0 0 0 1 1 0
OG0000006 0 0 0 1 1 0
OG0000007 0 0 0 1 1 0
OG0000008 1 0 0 0 0 0
OG0000009 1 0 0 0 0 0
OG0000010 1 0 0 0 0 0
I want to use awk to print the first column if column D and E is 1 and rest is 0.
OG0000004
OG0000005
OG0000006
OG0000007
I tried to do this with individual files of each column using the awk command
awk 'NR==FNR{arr[$0];next} $0 in arr' file1 file2
but doing this I had to generate multiple files and I thought using a binary file will be a more clean way.
Please Help,