Jun 23, 2017

How to sleep for some time in Bash script

You need to use the sleep command to add delay for a specified amount of time. The syntax is as follows for gnu/bash sleep command:


Where SUFFIX may be:

s for seconds (the default)
m for minutes.
h for hours.
d for days.
To sleep for 5 seconds, use:
sleep 5