From f3c3fcdf99f2e1ec520e911d6d31149a1075e8c9 Mon Sep 17 00:00:00 2001 From: Tim Wharton Date: Wed, 12 Apr 2017 07:16:52 -0400 Subject: [PATCH] Update network to support SSIDs with spaces (#95) The results from running iwlist through awk are tab delimited. By echoing with out quotes the tabs become spaces but then the cut messes up if there is spaces. By using quotes around $x the tabs are kept and cut uses tab as the default delimiter so no need to specify. --- bootstrap/www/network | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap/www/network b/bootstrap/www/network index fd43139..ec0f8a2 100755 --- a/bootstrap/www/network +++ b/bootstrap/www/network @@ -280,10 +280,10 @@ echo "" hidden="" while read x; do - SSID=$(echo $x | cut -d' ' -f1) - ADDR=$(echo $x | cut -d' ' -f2) - ENC=$(echo $x | cut -d' ' -f3) - QUAL=$(echo $x | cut -d' ' -f4) + SSID=$(echo "$x" | cut -f1) + ADDR=$(echo "$x" | cut -f2) + ENC=$(echo "$x" | cut -f3) + QUAL=$(echo "$x" | cut -f4) echo "" hidden="$hidden