I have tried to extract unique domains from a list of emails stored in a folder. I tried the following
The input given was readable to me as emails in the file.
sed 's/^.*@//g' "180 Millions Emails Data 1"/* | sort -u > OutPutUniqueDomain2.txt
The output is something like this:
®_18casper???!!!!!!!®@yahoo.com ®_18casper®@yahoo.com §Ú°Û±o€£°÷°Ê€H§A§OœK¬Ü@home.com ³·³·---ŠÜ€ÖÁÙŠ³§A@hotmail.com §AŠn¶Ü@hotmail.com ³aªoºÐ@hotmail.com aol.com Aol.com Aol.Com AOl.com AOL.com
Expected Output is:
yahoo.com home.com hotmail.com aol.com
I expect to have only unique domains in my output. I don't know even if the input file is properly fed still these type of unknown charcters are appearing in the file and even the domain is not extracted. They appear like an email. Also the domain is not unique. What wrong I have done with the command?