wget print content to screen

wget is used to download files. When you use wget to run cronjob, it creates a lot of files. To avoid this, you can use the wget option -qO-

If you want to use wget, you can use -O option, that speicify file to save. You can use -O /dev/stdout, so downloaded file content will be written to stdout.

wget -O /dev/stdout http://checkip.amazonaws.com

You can use -q to hide the download progres message (quite).

wget -q -O /dev/stdout http://checkip.amazonaws.com

-O /dev/stdout can be replaced with

-O -

Or

-O-

Example

wget -qO- http://checkip.amazonaws.com

See wget

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *