Instead of running with -q, try running with --debug and report back on what
wget is reporting when run from a cron job.

Tony
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Maurus Frey
Sent: Saturday, December 12, 2009 6:54 AM
To: [email protected]
Subject: [Bug-wget] wget with no stdout delivers no result

Hi,

I'm regularly using wget without any problem for wide spread of web tasks.

Now I got a problem using wget (Ver. 1.12 - compiled from source) on a
"embedded" Linux device (running kernel 2.6.28 and busybox).

The following shell script works fine if called from the console. It
"doesn't work" if it's started from the background (crond) or with
redirected Output to /dev/null. "It doesn't work" means that there is a
empty Variable logged to syslog (by the command logger)

#!/bin/sh

wget -q -o /home/maus/wget.log -O /home/maus/wget.result
http://maus.blabla.ch/myip.php
IP=`cat /home/maus/wget.result`

logger $IP
rm /home/maus/wget.result

I'm confused completely from the fact, that the same script works fine
on my Linux (Mint [Ubuntu]) computer but not on the embedded device.

Any suggestions? Thanks.

regards

maurus




Reply via email to