March 2002
Beginner
504 pages
10h 47m
English
The sleep command pauses for a given number of seconds. The basic syntax is
sleep n
where n is the number of seconds to sleep or pause. Some types of UNIX enable other time units to be specified. It is usually recommended that n not exceed 65,534.
The sleep command can be used to give a user time to read an output message before clearing the screen. It can also be used when you want to give a series of beeps:
echo -e "A value must be input!\a" sleep 1 echo -ne "\a" sleep 1 echo -ne "\a"
\a causes echo to output an audible beep. The -e option is required on some UNIX systems for \a to sound a beep. The -n option suppresses the newline that echo normally prints. The sleep command is used in the previous example to give a sequence ...
Read now
Unlock full access