bash script sleep code example
Example 1: sleep command bash
sleep NUMBER[SUFFIX]
sleep 5m
sleep 0.1
s - seconds (default)
m - minutes
h - hours
d - days
When no suffix is specified, it defaults to seconds.
Example 2: sh wait 10 seconds
sleep .5
sleep 5
sleep 5s
sleep 5m
sleep 5h
sleep 5d
Example 3: bash wait 3 seconda
sleep .5
sleep 5
sleep 5s
sleep 5m
sleep 5h
sleep 5d
Example 4: pause in bash
read -t 5
sleep 5s
Example 5: pause bash script
function pause(){
read -s -n 1 -p "Press any key to continue . . ."
echo ""
}
pause