ip a show dev eth0 | grep 'inet6 2a01:4f8:' | awk '{print $2}' | cut -d'/' -f1 | sed -e 's/::/Z/g' | cut -d"Z" -f1
:D
€dit: Es geht noch schlimmer
ipcalc -b $(ip a show $ETHDEV | grep "inet\ " | sed 's/^ *//g' | awk '{print$2}') | grep "Network" | tr -s " " | awk '{print$2}' | cut -d'/' -f1)