Skip to content

Commit c6e70a9

Browse files
authored
Update network-status-mac
1 parent 87a82cc commit c6e70a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

network-status-mac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#/usr/bin/env bash
22

3-
current_if=$(scutil --dns|grep if_index|cut -d' ' -f 6|sed 's/[()]//g')
3+
current_if=$(scutil --dns|grep if_index|cut -d' ' -f 6|sed -n 's/[()]//g;1p')
44
if_info=$(networksetup -listnetworkserviceorder | grep ${current_if})
55
if_name=$(echo ${if_info} | sed 's/.*Hardware Port: \(.*\),.*/\1/')
66
[ -z ${if_name} ] && echo '-' || echo ${if_name}

0 commit comments

Comments
 (0)