From 4092d969f7a8e7fa4a26946edcab7d396aa0909f Mon Sep 17 00:00:00 2001 From: Matias Barcenas Date: Thu, 17 Aug 2017 17:45:48 -0500 Subject: [PATCH] Suppressed grep file not found error. --- lib/InterfaceUtils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/InterfaceUtils.sh b/lib/InterfaceUtils.sh index 3b1ddfc..73743a1 100644 --- a/lib/InterfaceUtils.sh +++ b/lib/InterfaceUtils.sh @@ -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