Colin Humphreys <[EMAIL PROTECTED]> wrote:
> I have a csv list of names and emails in the form below....
> 
> name,email,company,title
> 
> I think it is allready sorted by the email field.
> 
> I want to do a case insensitive match on "email" and remove duplicates.
> 

This is what I have come up with, but there is probably an
easier way:

cat data_file | awk -F , '{print $1,$3,$4,$2}' | \
sort +3 -f | uniq -i -f 3 | \
awk '{print $1,$4,$2,$3}' | sed 's/ /,/g' > result_file

--
Josh


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to