【问题标题】:how to display the html codes of a webpage specified by a URL using shell in Ubuntu?如何在 Ubuntu 中使用 shell 显示由 URL 指定的网页的 html 代码?
【发布时间】:2011-08-11 18:11:19
【问题描述】:

我想在 Ubuntu 中使用 shell 显示由 URL 指定的网页的 html 代码?我怎么能这样做?

【问题讨论】:

    标签: shell curl wget


    【解决方案1】:

    你可以使用 cURL:

    curl http://whatever.com
    

    你可能需要安装 curl -

    apt-get install curl
    

    【讨论】:

      【解决方案2】:

      为了补充斯蒂芬的回答,wget 也可以这样做:

      wget -q -O - http://example.com
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-06-03
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-05-04
        • 1970-01-01
        • 2010-12-24
        • 2011-07-07
        相关资源
        最近更新 更多