+ for host; do
+ # c = cabled, w = wireless
+ if ping -q -c1 -w1 ${host}c.b8.nz &>/dev/null; then
+ targets+=(${host}c.b8.nz)
+ elif ping -q -c1 -w1 $host.b8.nz &>/dev/null; then
+ targets+=($host.b8.nz)
+ elif ping -q -c1 -w1 ${host}w.b8.nz &>/dev/null; then
+ targets+=(${host}w.b8.nz)
+ fi
+ done