I’ve got a csv file where the left most column contains an ID field. Is there a clever way I can use any utility programs such as sed to find any ID’s that are used more than once?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If all you want is the IDs, then you can try
where
$NUMis the number of the field containing the ID. Thecutcommand will extract a list of ids, and theuniqcommand will show you only those which are duplicated.