bojomojo 0 Newbie Poster

Hello,
I have a file with each line consisting of certain fields. Lets say I want to detect which lines have the second field equal..

For example here is the file:

XM2 N$2 N$2 GROUND GROUND nch_mac1 l=50n w=150n multi=1 nf=1 sd=140n
XM1 N$12 N$2 GROUND GROUND nch_mac2 l=50n w=150n multi=1 nf=1 sd=140n
XM3 N$2 N$2 GROUND GROUND nch_mac3 l=50n w=150n multi=1 nf=1 sd=140n
XM4 N$13 N$2 GROUND GROUND nch_mac4 l=50n w=150n multi=1 nf=1 sd=140n
XM5 N$2 N$2 GROUND GROUND nch_mac5 l=50n w=150n multi=1 nf=1 sd=140n
XM6 N$15 N$2 GROUND GROUND nch_mac6 l=50n w=150n multi=1 nf=1 sd=140n
XM7 N$3 N$2 GROUND GROUND nch_mac7 l=50n w=150n multi=1 nf=1 sd=140n
XM8 N$3 N$2 GROUND GROUND nch_mac8 l=50n w=150n multi=1 nf=1 sd=140n

And I want to print which lines have the same second field.