Sep 17, 2018

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:

sleep NUMBER[SUFFIX]

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