diff --git a/backUpIncremental.sh b/backUpIncremental.sh index fb04579..8d6b43f 100755 --- a/backUpIncremental.sh +++ b/backUpIncremental.sh @@ -48,9 +48,9 @@ while IFS= read -r -d '' file; do if (( (current_time - file_date) > 86400 )); then backup_files+=("$file") fi -done < <(find "$BACKUP_DIR" -name ${backUpPath}/${dbName}-incremental-*.sql.gz" -type f -print0) +done << (find "$BACKUP_DIR" -name ${backUpPath}/${dbName}-incremental-*.sql.gz" -type f -print0) # 遍历数组,打印每个文件名 for file in "${backup_files[@]}"; do echo "$file" - done +done