I have a tab separated file like this:
1 10502 C T
1 10506 C T
1 10567 G A
...
And I'm trying to print out all lines where column 3 != column 4
, excluding the cases where column 3 = C and column 4 = T
.
I tried
awk '{
if (($3 == $4) || ($3 == C && $4 == T) )
next ;
else
print $0; }'
but I'm not sure what's going wrong...
just fix your codes:
awk '($3 != $4) && !($3=="C" && $4=="T")' file