Site icon Dipin Krishna

Search Google.com from the Linux command line

You can search Google.com from the Linux command line without using a command line web browser like lynx or Elinks.

All u need is the curl and html2text packages installed. Then issue the following command:


curl -A Mozilla http://www.google.com/search?q=Dipin+Krishna |html2text -width 60

where you can replace Dipin Krishna with another keyword of your choice. The results will be displayed in your console application with a width of 60.

Few other examples:

curl -A Mozilla http://www.google.com/search?q=how+to+install+ubuntu  |html2text -width 80
curl -A Mozilla http://www.google.com/search?q=install+gtalk+in+ubuntu |html2text -width 100
Exit mobile version