Use [[:blank:]] instead of space in iwlist regex
This commit is contained in:
parent
3bae9f44f1
commit
9c4a95b0b1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user