Computing.Net > Forums > Unix > sleep command problem

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

sleep command problem

Reply to Message Icon

Name: fanco
Date: October 4, 2007 at 05:20:42 Pacific
OS: xp
CPU/Ram: 512
Product: hp
Comment:

please help me to fix my script trying to use sleep 2 minutes while the system is sleeping i want to print out same message every 5 seconds
thanks

t=`date +%S`

while [ t = t+120 ]
do
sleep 5

echo "this program will end in 2 minute"
done



Sponsored Link
Ads by Google

Response Number 1
Name: Devaraj (by Fidy)
Date: October 4, 2007 at 15:05:31 Pacific
Reply:

may be you shud try this

t=0
while [ t< 24 ]
do
echo "This program will end in 2 minutes\n"
t=$(( t + 1 ))
sleep 5

done

Regards,
Devaraj Takhellambam


0
Reply to Message Icon

Related Posts

See More


Checking Enter in substri... XDMCP problem



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: sleep command problem

sleep command www.computing.net/answers/unix/sleep-command/2304.html

Help with problem www.computing.net/answers/unix/help-with-problem/3513.html

Sort command problem www.computing.net/answers/unix/sort-command-problem/4043.html