Results 1 to 4 of 4
Hi to all in the forum...
i wanna show a certain statment every one second in my code , any one can help me ..!!
i now that i need ...
- 11-29-2009 #1Just Joined!
- Join Date
- Nov 2009
- Posts
- 4
how to show statment every one second
Hi to all in the forum...
i wanna show a certain statment every one second in my code , any one can help me ..!!
i now that i need using timer but how..???
regards,
- 11-29-2009 #2Linux User
- Join Date
- Jan 2007
- Location
- cleveland
- Posts
- 452
using the shell--
while true
> do
> more statement; sleep 1s
> donethe sun is new every day (heraclitus)
- 11-29-2009 #3Linux User
- Join Date
- May 2008
- Location
- NYC, moved from KS & MO
- Posts
- 251
If you are programming in shell, you can also use command watch to accomplish the task. For example,
will show the current partitions usage at an interval of 1 second (useful if you need to estimate how much longer a cp or dd process is going to finish).Code:watch -n 1 df
Type man watch in shell to learn more.
- 11-30-2009 #4Just Joined!
- Join Date
- Nov 2009
- Posts
- 4
thx a lot for u , i try it and the problem was solved.


Reply With Quote