I am trying to make a simple command that can show me the duplicate data from one specific column and also give me the original line number.
Example of file:
JENNIE;30;DOCTOR;F SARA;26;POLICE;F EDWARD;32;TEACHER;M ROBERT;44;POLICE;M
With the following command I will get the duplicates from column 3
cat FILE.txt |cut -d ";" -f3 |sort |uniq -d
The problem is that I need to get the original line number of the results.
My command shows:
And I want to get
2- POLICE 4- POLICE