Skip to content

Commit

Permalink
Match SSIDs as full words
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Olivert Riera committed Apr 17, 2019
1 parent 1a9dea4 commit aca8935
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wifi-connect
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ else
fi

# If the connection already exists, activate it.
if nmcli c | awk '{print $1}' | tail -n+2 | grep "${ssid}" > /dev/null; then
if nmcli c | awk '{print $1}' | tail -n+2 | grep -E "^${ssid}$" > /dev/null; then
nmcli c up "${ssid}"
exit $?
fi
Expand Down

0 comments on commit aca8935

Please sign in to comment.