Skip to content

Instantly share code, notes, and snippets.

@ddnn55
Created September 21, 2018 18:44
Show Gist options
  • Save ddnn55/4b9b831590b3d0053bd9b8c55a0913ff to your computer and use it in GitHub Desktop.
Save ddnn55/4b9b831590b3d0053bd9b8c55a0913ff to your computer and use it in GitHub Desktop.
get local IP shell script
#!/usr/bin/env bash
ifconfig | grep inet\ | grep -v inet\ 169.254 | tail -1 | cut -d " " -f 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment