I am completely new to shell scripting but have been assigned the task of creating several batch files to manipulate data. My final task requires me to find lines that have duplicates present then delete not only the duplicate but the original as well. The script will be used in a windows environment so I am using GNU sed. Below is a sample of the data:
180222,1,7.3,1Z0E947E0353634,9.49,UPAC
180223,1,7.3,1Z0E947E0373254,9.49,UPAC
180224,1,7.3,1Z0E947E0371556,8.33,UPAC
180222,1,7.3,1Z0E947E0353634,9.49,UPAC
In this example the first and last lines are duplicates and I would like to delete them both. I have been searching for several days and have not been able to figure out how to achieve this :wall:. Unfortunately I am short on time and would greatly appreciate any help possible. Thanks.