I have a file with a long list of names, but without their e-mail addresses. Because the list is very long, I would like to build a script that takes each line from the file (it can be PDF or CSV) and send the line in the browser address bar or on Google. Is there any way to do that in Linux? If so, which commands should I use or how should I tackle this problem?

I saw that Java can do this, but I have no knowledge of that. What I have is a computer with Linux OS. Can anyone help me with this?

Thank you!

Example of file content:

John Adams         BMW
Jens Erikson       Walmart
Stephen Smith      Tesco

And I would like the script to take the name and put it in the address bar or on Google.

closed as off-topic by user34720, Archemar, Anthony Geoghegan, GAD3R, Eric Renouf Jan 19 '17 at 12:45

  • This question does not appear to be about Unix or Linux within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

locked by Community Jan 19 '17 at 12:45

  • 2
    How can you know that the John Adams Google finds is the one you want? What I mean is that names are not unique, so you need to find a way to circumvent that issue. – schaiba Jan 19 '17 at 10:44
  • Good point. I am interested more in the action of having the name in the google search bar and then I can look it up by myself. I don't expect that the script will look that specific person for me. Thanks for the comment, though! – Physther Jan 19 '17 at 10:50
  • 1
    This should give you some light, on how to open a browser from cli, with the keywords you wanna search. It is now just a matter of crawlingh through the csv file - if-not-true-then-false.com/2009/… – user34720 Jan 19 '17 at 11:08
  • 2
    However, you have another issue here. How will columns be separated? with tabs? Cause, on the first column you have 2 word, and the second just one? Is this a "fixed" template of what we can expect from your csv file? – user34720 Jan 19 '17 at 11:21
  • 1
    Hope @nwildner posts the final code as an answer. To deal with PDF files, you may convert it into a flat text file using pdftotext -layout sample.pdf. The output file would be named sample.txt. The -layout option specifies that the layout in the PDF file should be maintained in the output text. Should work fine if the PDF has just columns of text as shown in the example. – Barun Jan 19 '17 at 12:27