[fix] Change order of ip link parsing

This commit is contained in:
William Wernert
2020-04-27 12:10:59 -04:00
parent dc8ed1978d
commit 5c5a97ca75
2 changed files with 10 additions and 8 deletions

View File

@@ -17,7 +17,7 @@ filter_unused_nics() {
fi
# Finally, set filtered_nics to any NICs we aren't using (and ignore interfaces that aren't of use)
filtered_nics=$(ip link | grep -vwe "$grep_string" | awk -F: '$0 !~ "lo|vir|veth|br|docker|wl|^[^0-9]"{print $2}' | sed 's/ //')
filtered_nics=$(ip link| awk -F: '$0 !~ "lo|vir|veth|br|docker|wl|^[^0-9]"{print $2}' | grep -vwe "$grep_string" | sed 's/ //g')
readarray -t filtered_nics <<< "$filtered_nics"
nic_list=()