in SusE linux 9.0 i discovered the sleep command and i read the info file but couldn't realy tell it's purpose, does anyone kno of how to use the sleep command?
Printable View
in SusE linux 9.0 i discovered the sleep command and i read the info file but couldn't realy tell it's purpose, does anyone kno of how to use the sleep command?
This article explains it so you can get a grasp on itQuote:
The wait command man page simply states that it pauses script execution until a specified process ID completes. The man page for the sleep command is a single line stating that it causes a script to pause for specified period of time.
http://enterprise.linux.com/enterpri.../1216215.shtml
Here are some others from the "Cli Series" that might be of interest to you
http://www.linux.com/search.pl?tid=89
I use it sometimes inside scripts. Sometimes I need to kill a process then restart it. If you script that, the killing might not be finished before it restarts the process. So you put a sleep between them to give the system some time to kill te process.
Code:#!/bin/sh
killall pptp
sleep 3
pptp 10.0.0.138 adsl &
AndQuote:
The sleep command is used to suspend the execution of a shell script for the specified time. This is usually in seconds.
http://linux.about.com/library/cmd/blcmdl3_sleep.htm
Cheers