summaryrefslogtreecommitdiffstats
path: root/scripts/wifi-menu
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2012-07-03 12:05:24 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2012-07-03 12:05:24 +0200
commit7e2ff917a67573ed957d57d2fd077b4c219c0d86 (patch)
tree47902df1e57bb4d4a24eccc3f364944bee3bcef3 /scripts/wifi-menu
parentb0373830cd79e35ea0d266726109c36a57122857 (diff)
downloadnetctl-7e2ff917a67573ed957d57d2fd077b4c219c0d86.tar.gz
netctl-7e2ff917a67573ed957d57d2fd077b4c219c0d86.tar.xz
Better grep usage
When possible, fgrep is preferred. This prevents interpreting variable search patterns as expressions. In setting the control paths, the search expression was updated to match what wpa_supplicant uses.
Diffstat (limited to 'scripts/wifi-menu')
-rwxr-xr-xscripts/wifi-menu2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/wifi-menu b/scripts/wifi-menu
index 669a49a..3d7ed57 100755
--- a/scripts/wifi-menu
+++ b/scripts/wifi-menu
@@ -105,7 +105,7 @@ create_profile()
local box flags key msg security
PROFILE="$INTERFACE-${1//\//_}"
[[ -e "$PROFILE_DIR/$PROFILE" ]] && PROFILE+=".wifi-menu"
- flags=$(grep -m 1 $'\t'"$1\$" "$NETWORKS" | cut -f 2)
+ flags=$(fgrep -m 1 $'\t'"$1\$" "$NETWORKS" | cut -f 2)
if [[ "$flags" =~ WPA|WEP ]]; then
security=${BASH_REMATCH[0],,}
else