scripts

shell scripts
git clone git://git.bitsmanent.org/scripts
Log | Files | Refs | README

commit 8446c1e64d390229bdfcba08d725cb1cfa4d5b54
parent c8731941a211d340df198bfae7af215c0dcebdbc
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Thu, 14 Dec 2017 07:23:32 +0100

Allow essid with spaces.

Diffstat:
Msrc/iwpick | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/iwpick b/src/iwpick @@ -9,7 +9,7 @@ connect() { essid=$2 key=$3 - iwconfig $iface essid $essid + iwconfig $iface essid "$essid" if [ -n "$key" ]; then tmp=$(mktemp) echo -n "$key" | wpa_passphrase "$essid" >> $tmp @@ -103,7 +103,7 @@ main() { echo "Connecting to ${essid}..." # If explicitly specified, check if the ESSID do exists - valid="$(iwlist $iface scan |grep ESSID |grep -wc $essid)" + valid="$(iwlist $iface scan |grep ESSID |grep -wc "$essid")" [ $valid -eq 0 ] && die "$essid: no network found" apps=(wpa_supplicant sdhcp) for a in ${apps[@]}