Created
April 30, 2015 12:40
-
-
Save skakri/e11a3eec1dd866219b83 to your computer and use it in GitHub Desktop.
broadcast-ip.sh
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 | |
# Broadcasts IP on 20420 (UDP) to local network. | |
# To get IP of this device, run `nc -ul 20420` and wait a bit. | |
ip -o -4 addr show | awk -F '[ /]+' '/global/ {print $4}' | socat - "UDP-DATAGRAM:255.255.255.255:20420,broadcast" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment