#!/bin/sh until ip -o address show dev "$1" | grep -q global; do printf 'Waiting for global address on %s\n' "$1" sleep 1; done