Created
June 3, 2020 15:07
-
-
Save cbadke/210b657fdcc01c7930659f2c014df240 to your computer and use it in GitHub Desktop.
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/sh | |
online=false | |
ping 8.8.8.8 | while read line; do | |
echo "$line" | |
if [[ $line == *"bytes from"* ]]; then | |
if [[ $online = false ]]; then | |
online=true | |
afplay ./dial-up.mp3 | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You'll have to find your own dial-up.mp3 ;)