Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Shell script to cycle osx wifi connection in a loop
#!/bin/bash
COUNTER=0
while [ $COUNTER -lt 10 ]; do
echo The counter is $COUNTER
let COUNTER=COUNTER+1·
networksetup -setairportpower airport off; networksetup -setairportpower airport on
sleep 5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment