Skip to content

Instantly share code, notes, and snippets.

@NN---
Created January 25, 2021 20:46
Show Gist options
  • Save NN---/8d9e9dd278398ac812ac5d61b0ab5e9c to your computer and use it in GitHub Desktop.
Save NN---/8d9e9dd278398ac812ac5d61b0ab5e9c to your computer and use it in GitHub Desktop.
shell_ip_address
ip=`ip address show | 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