How to pause a script in Bash
In order to make a script in Bash pause, sleep or wait for a period of time you need to use the command sleep
Using sleep in Bash
echo "hello"
sleep 60 ## this will sleep for 60 seconds
echo "after 60 sec"
Extra features
You can additionally specify the unit of time.
| letter | unit |
|---|---|
s default |
seconds |
| m | minutes |
| h | hours |
| d | days |