mirror of
https://github.com/qosmio/nss-packages.git
synced 2025-12-16 08:12:53 +00:00
nss-drv: nss_stats: fix gawk regex compatibility
It's not necessary to escape '#' and '=' in awk regexes, doing so causes gawk to throw warnings. Busybox awk is more permissive and does not throw warnings. Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
parent
d845680ef2
commit
370137d0bf
@ -2,9 +2,9 @@
|
||||
# shellcheck disable=2046,3037,3010
|
||||
###############################################################################
|
||||
# QCA NSS Driver Debug Script
|
||||
# version 20240622
|
||||
# version 20250631
|
||||
#
|
||||
# Requires: NSS Driver 12.1+
|
||||
# Requires: NSS Driver 11.4+
|
||||
# Usage: /lib/debug/qca-nss-drv (no arguments)
|
||||
# Description: Display non-zero NSS statistics with color highlighting
|
||||
# (requires a terminal that supports ANSI escape codes)
|
||||
@ -18,8 +18,8 @@ function color(c, s) {
|
||||
if ($3 > 0) {
|
||||
if ($3 ~ /^[0-9]+/ && $3 > 0 && $0 ~ /%/ ) c = 3
|
||||
if ($2 ~ /Avg/ ) c = 4
|
||||
if ($1 ~ /\#/ ) c = 7
|
||||
if ($3 ~ /^[0-9]+$/ && $3 > 0 && $0 ~ /\=/ ) c = 3
|
||||
if ($1 ~ /#/ ) c = 7
|
||||
if ($3 ~ /^[0-9]+$/ && $3 > 0 && $0 ~ /=/ ) c = 3
|
||||
if ($0 ~ /<</) c = 4
|
||||
if ($4 == "error") c = 1
|
||||
else if ($4 == "special") c = 6
|
||||
|
||||
Loading…
Reference in New Issue
Block a user