This wget recipe shows you how to make wget print the server response to stdout instead of saving it to a file. To do that, pass a single dash -
to the -O
flag.
Print the Response to Stdout
wget -O - https://google.com
This recipe uses the -O
flag and tells wget to write the output to stdout instead of saving it to a file. This is handy when you want to pipe the result into another command or just peek at the response.
Created by Browserling
These wget recipes were written down by me and my team at Browserling. We use recipes like this every day to get things done and improve our product. Browserling itself is an online cross-browser testing service powered by alien technology. Check it out!
Secret message: If you love my wget recipe, then I love you, too! Use coupon code WGETLING to get a discount at my company.