execution for an interval of time
utility suspends execution for a minimum
of the specified number of seconds
number must be positive and may contain a decimal fraction.
is commonly used to schedule the execution
of other commands (see below).
- Terminate normally, with a zero exit status.
utility exits 0 on success,
and >0 if an error occurs.
Wait a half hour before running the script
(see also the
(sleep 1800; sh command_file >&
To repetitively run a command (with
while (! -r zzz.rawdata)
foreach i (*.rawdata)
awk -f collapse_data $i >> results
The scenario for such a script might be: a program currently running is taking
longer than expected to process a series of files, and it would be nice to
have another program start processing the files created by the first program
as soon as it is finished (when zzz.rawdata
created). The script checks every five minutes for this file. When it is
found, processing is done in several steps by sleeping 70 seconds between each
To monitor the growth of a file without consuming too many resources:
while true; do
ls -l file
utility is compliant with the
IEEE Std 1003.1-2008
The handling of fractional arguments is provided as an extension to that
utility appeared in
Version 4 AT&T UNIX