Hello All, I have a file which has repeated lines. I want to print the lines which are repeated three times.
Please help.
Hello All, I have a file which has repeated lines. I want to print the lines which are repeated three times.
Please help.
try below
awk '{A[$0]++}END{for (i in A){if(A==3){print i}}}' filename
awk '++A[$0]==3' file
Many thanks Vidyadhar & Yoda for your help...
I tried Yoda's code as it looked smaller & worked perfectly..
Now I need one more help.. It definitely should be another thread..