On Sun, Jun 28, 2009 at 7:25 AM, subbu<vallabh...@gmail.com> wrote:
>
> i have seen that code but iam confused how to store the result in to a
> file when the result of ping is "Request time out" and can you tell me
> how my program can give defaultly ping for every 5 minutes with out
> even my intentiuon, and it must store each time even the result in to
> a file.
If you want to both see the result and put it in a file, you
can pipe the output of ping to a file by using "tee".
In bash you do it like this: $ping 192.168.1.10 | tee ping_output.log
For your second question, try to use a separate thread in your
program. Put it to sleep and wake it up as you need.
--
Thank you
Balachandran Sivakumar
Arise Awake and stop not till the goal is reached.
Mail: benig...@gmail.com
Blog: http://benignbala.wordpress.com/