ping -q -w 1 -c 1 x.y.z.w > /dev/null && echo ok || echo error