grep -hrio "\b[a-z0-9.-]\+@[a-z0-9.-]\+\.[a-z]\{2,4\}\+\b" /root/Desktop/docs/ > emails.txtNext I'll sort them for uniqueness.
sort -i emails.txt | uniq -u > emails1.txt
Next I'll make sure there no .gov or .mil addresses. I'm only adding people with college email addresses or commercial email address. You can apply further expressions to the earlier grep statement and just get emails from certain domains if you want.
sed -i '/.gov/d' emails1.txtNow I'll count the lines in my text file and see if I'm over 5,000 contacts. gmail will not let you import more than 5,0000 at a time. There's a few ways to get a line count.
sed -i '/.mil/d' emails1.txt
sed -n '$=' emails1.txtOr
cat emails1.txt | wc -l
If the count is more than 5,000 lines I'll have to split the emails list up into smallers files.
split --suffix-length=8 --lines=2500 emails1.txt
Now I'll run this hastily coded C++ program
//application to sort email addresses and put them into a CSV for use with gmail.
#include <string>
#include <sstream>
#include <iostream>
#include <cctype>
#include <fstream>
#include <iomanip>
using namespace std;
int main (int argc, char* argv[])
{
//build command line statement from string variables
{ofstream myfile;
myfile.open ("/root/Desktop/emails.csv");
{ string line; ifstream infile ("/root/file.txt");
//input the layout information for CSV file
myfile << "Name,Given Name,Additional Name,Family Name,Yomi Name,Given Name Yomi,Additional Name Yomi,Family Name Yomi,Name Prefix,Name Suffix,Initials,Nickname,Short Name,Maiden Name,Birthday,Gender,Location,Billing Information,Directory Server,Mileage,Occupation,Hobby,Sensitivity,Priority,Subject,Notes,Group Membership,E-mail 1 - Type,E-mail 1 - Value,E-mail 2 - Type,E-mail 2 - Value" << endl;
if (infile.is_open())
{ while ( getline (infile,line) )
//output conacts to contact list. Comas delimit contact information fields.
myfile << ",,,,,,,,,,,,,,,,,,,,,,,,,,,* ," << line << ",," << endl;
infile.close();
myfile.close();
} else cout << "Unable to open file" << endl;
}
}
return 0; }
Now you can import your CSV into gmail and add your the email addresses to your contact list. Then you can invite friends on facebook from your gmail account. Even if you don't actually know the people facebook will invite them because you have their email addresses. You can also do this with Yahoo! and other email services but the CSV file formats may be a little different. It's mostly a matter of getting the header information correct and having the correct number of commas.
need help on my feacbook account i can't asscc it
ReplyDeletekindly help me
ReplyDelete