Fix issue with bash interpreting numbers as octals

This commit is contained in:
Wojciech Kozlowski 2020-11-15 21:51:24 +01:00
parent 19ab178b75
commit bb61cf57b0

View File

@ -16,7 +16,7 @@ DIRNAME=$(dirname $SCRIPT)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Run only if it's the first week of the month. # Run only if it's the first week of the month.
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
day_of_month=`date '+%d'` day_of_month=`date '+%d' | bc`
if (( $day_of_month > 7 )) if (( $day_of_month > 7 ))
then then
echo -e "${CYAN}[${SCRIPT}] No B2 backup this week ${NC}" echo -e "${CYAN}[${SCRIPT}] No B2 backup this week ${NC}"