marksnap YEAR "${DATE:0:4}" $CNO
elif [[ "$TS" > "$MONTHLY" ]]
marksnap MONTH "${DATE:5:2}" $CNO
- elif [[ "$TS" > "$WEEKLY" ]]
+ elif [[ "$TS" > "$WEEKLY" ]] ; then
# For older than most recent week, keep last snapshot each week
marksnap WEEK "$(( 7${DATE:8:2} / 7 - 100 ))" $CNO
- elif [[ "$TS" > "$DAILY" ]]
+ elif [[ "$TS" > "$DAILY" ]] ; then
marksnap DAY "${DATE:8:2}" $CNO
- elif [[ "$TS" > "$HOURLY" ]]
+ elif [[ "$TS" > "$HOURLY" ]] ; then
marksnap HOUR "${DATE:8:2}-${TIME:0:2}" $CNO
else
echo "$CNO $DATE $TIME within last hour"