As an alternative fix, you could avoid using wget
— which, as its name implies, is intended for getting web content from a given URL. In other words, it's built to be a "download" tool. (It is, of course, very flexible, as Indrek demonstrated in his answer. But its defaults work against your purposes.)
Since you don't need or want to actually download anything (you're just accessing the URL to fire off a server-side script), the curl
command is a bit more appropriate for your script. It will write the results of its requests to stdout by default, instead of to a file.
So, replacing wget
with curl
in your code above should fix the file-creation problem without any further work.
Specifically
curl --silent <address> 1>/dev/null
will do the job. – Daniel Andersson – 2012-04-23T11:33:29.823Generally, yes, that'd allow curl to operate silently regardless of the content being retrieved. However, not even really necessary in this case, since the remote server doesn't output anything (wget was "downloading" empty files), and curl is wonderfully free of output unless something goes wrong or there's data retrieved. That's what made curl so ideally suited to this particular application. – FeRD – 2012-12-16T12:38:49.850