How to input data from a file into a web browser search engine?

Hi,

I have a list of strings in a file on my terminal. I would like to input each line into a search engine and press the search button within a web browser. How can this be done? I am using firefox

Thanks

The following will use the default search engine configured for firefox:

cat inputfile|while read line; do
  firefox -search "$line"
done

If you don't want a new window for each result, you could use the following to get them as a new tab in an existing firefox window instead:

cat inputfile|while read line; do
  firefox -new-tab "http://www.google.com/search?q=$line"
done