Delete characters & find unique IP addresses with port

Hi,

I have a file having following content.

 
<sip:9376507346@97.208.31.7:51088
<sip:9907472291@97.208.31.7:51208
<sip:8103742422@97.208.31.7:51024
<sip:9579892841@97.208.31.7:51080
<sip:9370904222@97.208.31.7:51104
<sip:9327665215@97.208.31.7:51104
<sip:9098364262@97.208.31.7:51024
<sip:9373282166@97.208.31.7:51080
<sip:9098711378@97.208.31.7:51208
<sip:9579892841@97.208.31.7:51080
<sip:9907472291@97.208.31.7:51024
<sip:7803832998@97.208.31.7:51024
<sip:7498816129@97.208.31.7:51080

I want to delete all characters before "@" & then find out the unique IP addresses with port.

Please help me to know how I can do this.

Thanks,
Sunil

Try:

awk -F@ '!A[$0=$2]++' file
1 Like

Thanks, It worked.