Help with shell script: selecting rows that have the same values in two columns

Hello, everyone

   I am beginner for shell programming.  I want to print all lines that have the same values in first two columns

data:

a  b   1   2
a  a   3   4 
b  b   5   6
a  b   4   6

what I expected is :

a  a   3   4 
b  b   5   6

but I searched for one hour in google, all scripts will give me this results:

a  b   4   6
a  b   1   2

Could anyone help me? This question stuck me a lot.

awk '$1==$2' myFila
1 Like

Great, Thank you so much.:b: You know, It's very difficult for a beginner like to me to figure out even it's a very simple command.