fix: bug: dev-agent.sh line 272 — grep -c ... || echo 0 produces 0n0 and breaks arithmetic (#574)
This commit is contained in:
parent
1499eb04df
commit
2b7edfaf1a
2 changed files with 6 additions and 2 deletions
|
|
@ -122,7 +122,8 @@ PAGES=$(printf '%s\n' "$PARSED" | jq -c '
|
|||
')
|
||||
|
||||
TOTAL_REQUESTS=$(printf '%s\n' "$PARSED" | wc -l | tr -d ' ')
|
||||
PAGE_VIEWS=$(printf '%s\n' "$PAGES" | grep -c . || echo 0)
|
||||
PAGE_VIEWS=$(printf '%s\n' "$PAGES" | grep -c . || true)
|
||||
PAGE_VIEWS="${PAGE_VIEWS:-0}"
|
||||
UNIQUE_VISITORS=$(printf '%s\n' "$PAGES" | jq -r '.ip' | sort -u | wc -l | tr -d ' ')
|
||||
|
||||
# Top pages by hit count
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue