IP=$( ip address show dev $DEV scope global \
| awk '$1 == "inet" { sub("/[^ ]+", ""); print $2; nextfile }' )
if [ "$IP" ]; then
IP=$( ip address show dev $DEV scope global \
| awk '$1 == "inet" { sub("/[^ ]+", ""); print $2; nextfile }' )
if [ "$IP" ]; then
[ -z "$RET" ] && continue
echo "$RET" | grep -Eqi '^[0-9]{1,3}(\.[0-9]{1,3}){3}$' || continue
[ -z "$RET" ] && continue
echo "$RET" | grep -Eqi '^[0-9]{1,3}(\.[0-9]{1,3}){3}$' || continue
[ -z "$RET" ] && continue
echo "$RET" | grep -Eqi '^([^@]*<)?[a-z0-9.+-]+@[a-z0-9-]+(\.[a-z0-9.-]+)+>?$' || continue
[ -z "$RET" ] && continue
echo "$RET" | grep -Eqi '^([^@]*<)?[a-z0-9.+-]+@[a-z0-9-]+(\.[a-z0-9.-]+)+>?$' || continue