Skip to content

Instantly share code, notes, and snippets.

@jimmyeisenhauer
Created March 14, 2016 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimmyeisenhauer/5ced81d7c7f18c7adf14 to your computer and use it in GitHub Desktop.
Save jimmyeisenhauer/5ced81d7c7f18c7adf14 to your computer and use it in GitHub Desktop.
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