Skip to content

Instantly share code, notes, and snippets.

@yijia2413
Created May 28, 2020 01:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yijia2413/43f09e341192292c3fe8bdb62acead02 to your computer and use it in GitHub Desktop.
Save yijia2413/43f09e341192292c3fe8bdb62acead02 to your computer and use it in GitHub Desktop.
get ip address
#!/bin/bash
set -ex
ip route get 8.8.8.8 | head -1 | awk '{print $7}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment