1

I'm working from the command line. I need to cat the response of a web request. What tool can I use to make the web request and print the response on stdout?

Here's the command I'm trying to make work:

$ wget http://crl.comodoca.com/COMODORSADomainValidationSecureServerCA.crl | \
       openssl crl -text -noout

I also tried netcat, but it resulted in a name lookup failure (with and without the http).

4

Use curl. It will output the content of the page on stdout:

mtak@frisbee:~$ curl www.google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.nl/?gfe_rd=cr&amp;ei=QB_7U9XRNMqyOpX6gPAJ">here</A>.
</BODY></HTML>
|improve this answer|||||
  • You're welcome, please mark this as a valid answer so other people can quickly see that this solved your problem. – mtak Aug 25 '14 at 11:41
1

This could be done also with wget:

wget -O - http://crl.comodoca.com/COMODORSADomainValidationSecureServerCA.crl
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.