System : Ubuntu 12.04
Techs : shell(bash)
I have a bash shell script who calls a web service. The web service is wrote in PHP and it will return true if everything is OK.
The method that I execute the calling service is like this :
wget -T 0 http://host/program/myurl > /tmp/mylog
Every time I execute the script shell with root, it will generate a file which is called myurl.x (x will be replaced by numbers) in my /root directory instead of in the /tmp/mylog, and this file contains only a number : 1, which I thought it means true.
According the option -O of wget which means –output-document, and we make the output file to /dev/null, the command will discard the output message.
So the command will be :
wget -O /dev/null -T 0 http://host/program/myurl