set -e bash --version | head -1 echo "=== ?????7 ???? + ????.env ??????????????????===" rm -rf /tmp/retention-test mkdir -p /tmp/retention-test for ts in 20260918-010101 20260919-020202 20260919-065901 20260920-000048 20260920-003606 20260920-012048 20260920-023000; do mkdir -p /tmp/retention-test/backup-$ts head -c 1024 /dev/zero > /tmp/retention-test/backup-$ts/pms-api done echo "??????" > /tmp/retention-test/backup-20260920-004848-api.env echo "??????????" > /tmp/retention-test/backup-2026092-010101 mkdir -p /tmp/retention-test/web /tmp/retention-test/api-server echo "=== ????? ===" ls -la /tmp/retention-test | grep backup echo "=== ???8? bash??? /data/pms ?? /tmp/retention-test?===" sed 's#/data/pms#/tmp/retention-test#g' /tmp/retention.sh > /tmp/retention-test.sh bash -n /tmp/retention-test.sh && echo "bash -n OK" bash /tmp/retention-test.sh echo "=== ??????????? 5 ???? + ????????===" ls -la /tmp/retention-test