sleep-(1f) - [FUNIX:TIME] pause for specified duration (LICENSE:PD)
Synopsis
Description
Options
Example
See Also
Author
License
sleep- [dd-hh:mm:ss[.xxx]|xxx.yyy[s|m|h|d|r]] ... [ -countdown|-countup [-cmd CMD ][-interval NN] ]|--help|--version
Given a duration in the form dd-hh:mm:ss.xxx where dd is days, hh hours, mm minutes and ss.xxx seconds pause for the specified amount of time.Alternatively, the time may be specified by a number immediately followed by a unit letter; where s is seconds, m is minutes, h is hours and d is days.
The suffix r is the same as the suffix s accept a random time between zero and the specified number of seconds is used. This is useful for spreading out cron(1) tasks in a HPC cluster. Only the seconds are randomized so the r suffix is generally used by itself with a single value.
Spaces before a suffix are significant. A suffix without a prefix is treated as if the prefix zero (0) was present.
Given multiple arguments, pause for the time specified by the sum of the values.
dd-hh:mm:ss Given a string representing a duration of time in the following forms: dd-hh:mm:ss[.xx] hh:mm:ss[.xx] mm:ss[.xx] ss[.xx]orxx[.yy]SUFFIX where Suffix may be s for seconds, m for minutes, h for hours, or d for days; or r for a random number of seconds up to the value. -countdown sleep in one-second intervals and count down to end of sleep command -countup sleep in one-second intervals and count up till end of command -interval COUNT how many seconds between counts when -countdown and -countup are specified. Values other than one may trim the total sleep time by up to COUNT seconds. --cmd COMMAND system command to repeat at the end of each interval --verbose output verbose messages --help display this help and exit --version output version information and exit
usage:
sleep- 0.10 # pause one tenth of a second sleep- 3m 10s # pause three minutes and 10 seconds sleep- 1:00:00 # pause for one hour sleep 50r # sleep a random number of seconds up to 50 sleep- 1d 86400 # pause two days sleep- 1-3:30 # pause one day, three hours and thirty minutes # for one day run date command every minute sleep- 1d --countdown --interval 60 --cmd date --rfc=3339=seconds
sleep(1), usleep(1), watch(1), xargs(1), yes(1), seq(1), repeat(1csh)
John S. Urban
Public Domain
Nemo Release 3.1 | sleep- (1) | February 23, 2025 |