File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -59,12 +59,12 @@ get_ioreg_vendor_and_model(){
59
59
60
60
get_network_interfaces (){
61
61
62
- local nic_list=$( networksetup -listnetworkserviceorder 2> /dev/null | grep -v Bluetooth | grep Hardware)
62
+ local nic_list=$( networksetup -listnetworkserviceorder 2> /dev/null | grep -v Bluetooth | grep -v DataTransfer | grep -v usbmodem | grep Hardware)
63
63
64
64
while read line; do
65
65
66
66
local human_name=$( echo " $line " | cut -d' ,' -f1 | awk -F ' : ' ' {print $2}' )
67
- local name=$( echo " $line " | sed " s/.* \(.*\))$/\1/" )
67
+ local name=$( echo " $line " | sed " s/.* \(.*\))$/\1/" | sed " s/([^a-z\-]*)//g " )
68
68
69
69
if [[ " $human_name " =~ " Ethernet" ]]; then
70
70
@@ -76,7 +76,7 @@ get_network_interfaces(){
76
76
local model=$( echo " $output " | cut -d" ;" -f2)
77
77
done <<< " $model_and_vendor"
78
78
79
- elif [[ " $human_name " =~ " AirPort" ]]; then
79
+ elif [[ " $human_name " =~ " AirPort" || " $human_name " =~ " Wi-Fi " ]]; then
80
80
81
81
local interface_type=" Wireless"
82
82
local model_and_vendor=$( get_ioreg_vendor_and_model " 802.11" | tr " \n" " ;" )
Original file line number Diff line number Diff line change 1
- 3.2
1
+ 3.3
You can’t perform that action at this time.
0 commit comments