Skip to content

Instantly share code, notes, and snippets.

@cbadke
Created June 3, 2020 15:07
Show Gist options
  • Save cbadke/210b657fdcc01c7930659f2c014df240 to your computer and use it in GitHub Desktop.
Save cbadke/210b657fdcc01c7930659f2c014df240 to your computer and use it in GitHub Desktop.
#!/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
@cbadke
Copy link
Author

cbadke commented Jun 3, 2020

You'll have to find your own dial-up.mp3 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment