Search code examples
linux

How to get title of website in linux terminal


I have this code

wget http://www.google.com

the above command is giving me the detail of the website like URL, IP address, etc. I not able to get the title of the website in Linux terminal?

Help?


Solution

  • How about:

    $ curl -L example.com | grep '<title>'
    

    The -L switch causes curl to follow redirects.