Skip to content

Instantly share code, notes, and snippets.

@orrisroot
Created April 26, 2020 02:00
Show Gist options
  • Save orrisroot/92d2b2ecef4e5289e361762f59a2bf99 to your computer and use it in GitHub Desktop.
Save orrisroot/92d2b2ecef4e5289e361762f59a2bf99 to your computer and use it in GitHub Desktop.
Get IPv6 global address
#!/bin/bash
DEVICE=$1
ip addr show dev ${DEVICE} | sed -e 's/^.*inet6 \([^ ]*\)\/.*scope global.*$/\1/;t;d'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment