Use [[:blank:]] instead of space in iwlist regex

This commit is contained in:
oblique 2015-07-18 09:19:04 +03:00
parent 3bae9f44f1
commit 9c4a95b0b1

View File

@ -299,7 +299,7 @@ can_transmit_to_channel() {
return 0
else
CHANNEL_NUM=$(printf '%02d' ${CHANNEL_NUM})
CHANNEL_INFO=$(iwlist ${IFACE} channel | grep "Channel ${CHANNEL_NUM} :")
CHANNEL_INFO=$(iwlist ${IFACE} channel | grep -E "Channel[[:blank:]]${CHANNEL_NUM}[[:blank:]]?:")
[[ -z "${CHANNEL_INFO}" ]] && return 1
return 0
fi