There was an error while loading. Please reload this page.
1 parent 87a82cc commit c6e70a9Copy full SHA for c6e70a9
network-status-mac
@@ -1,6 +1,6 @@
1
#/usr/bin/env bash
2
3
-current_if=$(scutil --dns|grep if_index|cut -d' ' -f 6|sed 's/[()]//g')
+current_if=$(scutil --dns|grep if_index|cut -d' ' -f 6|sed -n 's/[()]//g;1p')
4
if_info=$(networksetup -listnetworkserviceorder | grep ${current_if})
5
if_name=$(echo ${if_info} | sed 's/.*Hardware Port: \(.*\),.*/\1/')
6
[ -z ${if_name} ] && echo '-' || echo ${if_name}
0 commit comments