xxxxxxxxxx
sleep NUMBER[SUFFIX] #Just use this command structure to wait/sleep
#Example:
sleep 5m #sleeps 5 minutes
sleep 0.1 #sleeps 0.1 seconds or 100 miliseconds
#Suffixes
s - seconds (default)
m - minutes
h - hours
d - days
When no suffix is specified, it defaults to seconds.
xxxxxxxxxx
# Sleep for 5 seconds
sleep 5
# Sleep for 2 minutes and 30 seconds
sleep 2m 30s
# Sleep for 1 hour
sleep 1h
xxxxxxxxxx
#!/bin/bash
echo "Time Before Sleep Statement:"
date +"%H:%M:%S"
sleep 3
echo "Time After Sleep Statement:"
date +"%H:%M:%S"