Fix: Treat date +%S as decimal instead of octal
The number of seconds elapsed in the current minute given by date is a 2-digit number. That means seconds 0 to 9 have a leading 0, which causes them to be interpreted as octal numbers. This is not intended, but doesn't actually break things (because 00 to 07 octal are equivalent to 0 to 7 decimal) until second 8 or 9, at which point we get an error because 08 and 09 are invalid octal numbers.
This commit is contained in:
parent
24554f2b69
commit
b19495a93c
2
avds
2
avds
@ -87,7 +87,7 @@ while [[ "${first_run}" -eq 1 || -n "${repeat}" ]]; do
|
||||
else
|
||||
case "${when}" in
|
||||
m)
|
||||
sleep $((60 - $(date +%S)))
|
||||
sleep $((60 - 10#$(date +%S)))
|
||||
;;
|
||||
h)
|
||||
readarray -t ms < <(date +'%M%n%S')
|
||||
|
Loading…
x
Reference in New Issue
Block a user