jayjaybigs
IS-IT--Management
I was wondering if anyone has a small shell scripts that do the following:
I have a file:
384348,xxxxxxxxx,xxxxxxx,xxxx,20040212
943053,xxxxxxxxx,xxxxxxx,xxxx,20030617
439345,xxxxxxxxx,xxxxxxx,xxxx,20000819
437829,xxxxxxxxx,xxxxxxx,xxxx,19870903
384348,xxxxxxxxx,xxxxxxx,xxxx,20040212
943053,xxxxxxxxx,xxxxxxx,xxxx,20030617
I will like to extract the duplicate based on first field and the last field.
Hence my final file should be:
384348,xxxxxxxxx,xxxxxxx,xxxx,20040212
943053,xxxxxxxxx,xxxxxxx,xxxx,20030617
I have a file:
384348,xxxxxxxxx,xxxxxxx,xxxx,20040212
943053,xxxxxxxxx,xxxxxxx,xxxx,20030617
439345,xxxxxxxxx,xxxxxxx,xxxx,20000819
437829,xxxxxxxxx,xxxxxxx,xxxx,19870903
384348,xxxxxxxxx,xxxxxxx,xxxx,20040212
943053,xxxxxxxxx,xxxxxxx,xxxx,20030617
I will like to extract the duplicate based on first field and the last field.
Hence my final file should be:
384348,xxxxxxxxx,xxxxxxx,xxxx,20040212
943053,xxxxxxxxx,xxxxxxx,xxxx,20030617