Skip to content

Instantly share code, notes, and snippets.

@heywoodlh
Created May 8, 2017 14:47
Show Gist options
  • Save heywoodlh/fc9fe6a8641d33dc43aa59b8484b9ea6 to your computer and use it in GitHub Desktop.
Save heywoodlh/fc9fe6a8641d33dc43aa59b8484b9ea6 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
IP=$(sudo arp-scan --localnet --numeric --quiet --ignoredups | grep -E '([a-f0-9]{2}:){5}[a-f0-9]{2}' | awk '{print $1}')
echo $IP | fmt -w 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment