Created
April 26, 2020 02:00
-
-
Save orrisroot/92d2b2ecef4e5289e361762f59a2bf99 to your computer and use it in GitHub Desktop.
Get IPv6 global address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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