diff options
author | Jouke Witteveen <j.witteveen@gmail.com> | 2012-07-03 12:05:24 +0200 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2012-07-03 12:05:24 +0200 |
commit | 7e2ff917a67573ed957d57d2fd077b4c219c0d86 (patch) | |
tree | 47902df1e57bb4d4a24eccc3f364944bee3bcef3 /scripts/wifi-menu | |
parent | b0373830cd79e35ea0d266726109c36a57122857 (diff) | |
download | netctl-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-x | scripts/wifi-menu | 2 |
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 |