Created
April 27, 2018 07:21
-
-
Save ngsctt/ec736719dec951b00fdcc473c1d63d15 to your computer and use it in GitHub Desktop.
Toggle WiFi power (macOS)
This file contains 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 characters
#!/bin/bash | |
if [[ $(networksetup -getairportpower en0) == *On ]] | |
then | |
networksetup -setairportpower en0 off | |
else | |
networksetup -setairportpower en0 on | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment