Last active
          March 28, 2020 04:58 
        
      - 
      
- 
        Save wkw/01dab92afaf95ec3f83ec1e11431ec9c to your computer and use it in GitHub Desktop. 
Revisions
- 
        wkw revised this gist Aug 10, 2017 . 2 changed files with 8 additions and 0 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ <?php # SOURCE: https://apple.stackexchange.com/a/226880 $ip = trim(exec("ipconfig getifaddr $(networksetup -listallhardwareports | awk '/Hardware Port: Wi-Fi/{getline; print $2}')", $out, $rc)); echo "$ip\n"; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ #!/usr/bin/env bash # SOURCE: https://apple.stackexchange.com/a/226880 ipAddress="$(ipconfig getifaddr $(networksetup -listallhardwareports | awk '/Hardware Port: Wi-Fi/{getline; print $2}'))" echo "Wi-Fi IP = $ipAddress" 
- 
        wkw revised this gist Aug 10, 2017 . No changes.There are no files selected for viewing
- 
        wkw created this gist Aug 7, 2017 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ <?php $ip = trim(exec("ipconfig getifaddr $(networksetup -listallhardwareports | awk '/Hardware Port: Wi-Fi/{getline; print $2}')", $out, $rc)); echo "$ip\n";