From 9c4a95b0b100119987e0b4bf2050b17edaab96c1 Mon Sep 17 00:00:00 2001 From: oblique Date: Sat, 18 Jul 2015 09:19:04 +0300 Subject: [PATCH] Use [[:blank:]] instead of space in iwlist regex --- create_ap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_ap b/create_ap index 8931d06..aed73ac 100755 --- a/create_ap +++ b/create_ap @@ -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