Suppressed grep file not found error.

This commit is contained in:
Matias Barcenas 2017-08-17 17:45:48 -05:00
parent ea1824b5ca
commit 4092d969f7
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ function interface_list_wireless() {
interface_list_all
local __interface_list_wireless__candidate
for __interface_list_wireless__candidate in "${InterfaceListAll[@]}"; do
if grep -q "DEVTYPE=wlan" /sys/class/net/$__interface_list_wireless__candidate/uevent 2> /dev/null
if grep -qs "DEVTYPE=wlan" /sys/class/net/$__interface_list_wireless__candidate/uevent
then InterfaceListWireless+=("$__interface_list_wireless__candidate")
fi
done