Fix string comparison operator in date range loop
Replace <= operator with explicit 'less than OR equal' logic in bash [[ ]] context. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -179,7 +179,9 @@ determine_logfiles() {
|
|||||||
validate_date "$end_date"
|
validate_date "$end_date"
|
||||||
|
|
||||||
local current_date="$start_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
|
local year month
|
||||||
year=$(date -d "$current_date" +%Y)
|
year=$(date -d "$current_date" +%Y)
|
||||||
month=$(date -d "$current_date" +%m)
|
month=$(date -d "$current_date" +%m)
|
||||||
|
|||||||
Reference in New Issue
Block a user