169
26
I have a crontab
that wget
s a PHP page every five minutes (just to run some the PHP code), and I want to send the output of the request to standard out, while sending the normal wget
output to /dev/null
(or otherwise hide it). I couldn't find it in the wget
manual.
I'm looking for something like:
wget -o stdout http://whatever.com/page.php > /dev/null
Anyone know?
5Mistitled, should be "How do you redirect wget to null?". – Bob Stein – 2014-12-30T13:47:34.077
2@BobStein-VisiBone I think it is titled correctly. I wanted the thing that is
wget
-ed to go to astdout
, and the normalstdout
to go tonull
(i.e. ignore what it usually prints, and instead print the response body). – Sean Adkinson – 2014-12-31T01:24:08.6236Oh! I stand corrected. I have started using
wget http://example.com/page.php -qO-
(That's a capital Oh.) That standard-outputs ONLY the response body. Is that what you wanted? – Bob Stein – 2014-12-31T04:32:20.673