Here’s the man page of wget -O:
http://www.gnu.org/software/wget/manual/html_node/Download-Options.html#Download-Options
Here’s a few examples:
-
wget with no flag
wget www.stackoverflow.com
Output:
A file named as index.html
-
wget with -O flag
wget -O filename.html www.stackoverflow.com
Output:
A file named as filename.html
-
wget with -O- flag
wget -O- www.stackoverflow.com
Output:
Output to stdout