I have a text file where column and row number will always vary, and want to remove entire rows from the txt file only if every column within it is equal to either $VAR1 or $VAR2. For example:
Lets say $VAR1="X" and $VAR2="N" and I want to remove any row where $VAR1 and $VAR2 makes up the entire column.
This would be my input:
hajn 32 ahnnd namm 5 543 asfn F X X N X X X N X 5739 dw 32eff Sfff 3 asd 3123 1
And this would be my desired output:
hajn 32 ahnnd namm 5 543 asfn F 5739 dw 32eff Sfff 3 asd 3123 1
I can solve this with a loop, but I was wondering if there's a powerful one liner way of doing this, preferably awk.