Click here for important information about

Need one more help UNIX script!

October 28, 2011 at 08:31:50
Specs: Windows Vista
Thanks nails for the previous help on this and it worked like a charm. I need one more thing if you guys can help me out..
My file ..


Similar like the one I asked previously , I need to check for First name + Last name duplicates in a file and print if they are < 10. Meaning, I need to check the complete file for duplicates with first name + Last name and the total number of duplicates is more than 10 then remove the entire records if not keep the records. Any help would be appreciated.

See More: Need one more help UNIX script!

October 28, 2011 at 10:55:17
The answer is the same as the other script only last name and first name have to be a key.

As I am traveling today, you will have to test this yourself.


rm -f mynewdata3.txt
awk ' BEGIN { FS="|";
while ( getline < "mydata3.txt" > 0 )

if($3$2 in myname)
if(myname[$3$2] < 10)
print $0 >> "mynewdata3.txt"

} ' mydata3.txt

Report •

November 2, 2011 at 10:15:16
Thanks like a charm

Report •
Related Solutions

Ask Question