#!/usr/bin/env bash# This script uses each argument to check if a host under that name is# reachable using pingset-euopipefail
functioncheck_online_status(){ifping-c1-w1$1>>/dev/null;thenecho"+ $1"elseecho"- $1"fi}forhostin$@;docheck_online_status$hostdoneexit0