I would like you to take a look at this simple script I wrote that's supposed to emulate the Unix sort [FILE] | uniq -cd
command. What's different about my script though is that it also lists line numbers telling the user where occurrences of duplicate lines are located in the file. Please, tell me what you think as well as what parts of the script, if any, you think I should rework to make it better.