Fix zero-count noise pattern handling
This commit is contained in:
@@ -800,7 +800,7 @@ collect_log_highlights() {
|
||||
while IFS= read -r p; do
|
||||
[ -n "$p" ] || continue
|
||||
local pcount
|
||||
pcount="$(grep -Eaic -- "$p" "$hits" 2>/dev/null || echo 0)"
|
||||
pcount="$(grep -Eaic -- "$p" "$hits" 2>/dev/null || true)"
|
||||
if [ "${pcount:-0}" -gt 0 ]; then
|
||||
printf '%d\t%s\n' "$pcount" "$p" >> "$noise_by_pattern"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user