From 55492be5f30a81b3b84bcf4bbc68dd7b47885c39 Mon Sep 17 00:00:00 2001 From: johannst Date: Sun, 25 Feb 2018 23:07:17 +0100 Subject: preserve 3 spaces for quality --- scripts/wifi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wifi.sh b/scripts/wifi.sh index 6f8417a..51262c6 100755 --- a/scripts/wifi.sh +++ b/scripts/wifi.sh @@ -23,7 +23,7 @@ done AP_NAME=$(iwgetid -r $if) AP_MAC=$(iwgetid -a $if | sed 's/.*\(\([0-9A-F]\{2\}:\)\{5\}[0-9A-F]\{2\}\).*/\1/') -AP_QUALITY=$(grep $if /proc/net/wireless | awk '{ print int($3 * 100 / 70) }')% +AP_QUALITY=$(printf '%3s' $(grep $if /proc/net/wireless | awk '{ print int($3 * 100 / 70) }'))% # first ipv4 addr IP_ADDR=$(ip address show $if | grep 'inet ' | sed 's/\s\+inet \([0-9.]\+\)\/.*/\1/') -- cgit v1.2.3