Skip to content

Instantly share code, notes, and snippets.

@ntrogers
Last active September 11, 2017 21:34
Show Gist options
  • Save ntrogers/0879a7b158802589ddee4bbca5ec04dc to your computer and use it in GitHub Desktop.
Save ntrogers/0879a7b158802589ddee4bbca5ec04dc to your computer and use it in GitHub Desktop.
[sh - Get Client IP] Get Client IP Address #macOS #nix #Bash
ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment