hi , thanks for the help but

4 views
Skip to first unread message

subbu

unread,
Jun 27, 2009, 9:55:20 PM6/27/09
to "Code For Freedom" Contest Participants
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.
so, can you guide me to achieve this requirement.

Balachandran Sivakumar

unread,
Jun 27, 2009, 11:10:24 PM6/27/09
to CodeFor...@googlegroups.com
Hi,

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/

Reply all
Reply to author
Forward
0 new messages