From 2a4d029c22450ba84793af4ce9e9743303ecfe38 Mon Sep 17 00:00:00 2001 From: h0tznpl0tz Date: Thu, 11 Sep 2025 17:37:06 +0200 Subject: [PATCH] Fix string comparison operator in date range loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace <= operator with explicit 'less than OR equal' logic in bash [[ ]] context. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- legacy/exitrace/exitrace.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/legacy/exitrace/exitrace.sh b/legacy/exitrace/exitrace.sh index 9dede6d..3e645fa 100755 --- a/legacy/exitrace/exitrace.sh +++ b/legacy/exitrace/exitrace.sh @@ -179,7 +179,9 @@ determine_logfiles() { validate_date "$end_date" local current_date="$start_date" - while [[ "$current_date" <= "$end_date" ]]; do + # Hinweis: In [[ ]] gibt es kein '<=' String-Operator. + # Daher explizit 'kleiner als ODER gleich' prüfen. + while [[ "$current_date" < "$end_date" || "$current_date" == "$end_date" ]]; do local year month year=$(date -d "$current_date" +%Y) month=$(date -d "$current_date" +%m) @@ -564,4 +566,4 @@ main() { # Script ausführen main "$@" -# Built with the help of Claude Code \ No newline at end of file +# Built with the help of Claude Code