Skip to content

Instantly share code, notes, and snippets.

@srathi-monarch
Created July 8, 2024 04:45
Show Gist options
  • Save srathi-monarch/9706c24885ef16dd202550a6a5422888 to your computer and use it in GitHub Desktop.
Save srathi-monarch/9706c24885ef16dd202550a6a5422888 to your computer and use it in GitHub Desktop.
IP from ip addr
ip addr show tun0 | grep -Po '(?<=inet )([0-9]{1,3}\.){3}[0-9]{1,3}(?=/[0-9]{1,3})'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment