curl

cURLは、いろいろなプロトコルで通信できるネットワークコマンドツール。

GitHub - curl/curl: A command line tool and library for transferring data with URL syntax, supporting HTTP, HTTPS, FTP, FTPS, GOPHER, TFTP, SCP, SFTP, SMB, TELNET, DICT, LDAP, LDAPS, MQTT, FILE, IMAP, SMTP, POP3, RTSP and RTMP. libcurl offers a myriad of powerful features

現在だと、Linuxなどはたいていインストールされているが、標準コマンドではない。

"curl"のみ打つと、

$ curl
curl: try 'curl --help' or 'curl --manual' for more information
$

ヘルプはこっちという感じで教えてくれる。
一番簡単なのは、curlの後にURLを渡すことで、

$ curl http://bgstation0.com/
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title id="title_index">B.G-STATION</title>
  </head>
  <body id="body_index" bgcolor="#ffffff" text="#7700cc" link="0000ff" alink="ff0000" vlink="ff00ff">
    <div id="div_title_image" align="center">
      <img src="/images/title.png" width="460px" height="140px" />
    </div>
    <div id="div_link_top" align="center">
      <a href="bgst/index.html">Top</a>
    </div>
  </body>
</html>
$

こんな風に、指定したURLのレスポンスボディであるHTMLを返す。