containers-monit/whatsmyip6.sh

4 lines
128 B
Bash
Raw Normal View History

2021-04-01 18:49:14 +00:00
#!/bin/sh
ip address show ${1:-$(whatsmydefaulteth)} | grep inet6 | grep global | tr -s " " | cut -d " " -f 3 | cut -d / -f 1