sysadmin_scripts/pingu/pingu
2026-01-10 12:41:49 +01:00

17 lines
264 B
Bash
Executable file

#!/usr/bin/env sh
USAGE="NOOT NOOT
USAGE : ./pingu <IP address> ..."
if [ $# -eq 0 ]; then
echo "$USAGE"
exit 1
fi
for host in $@; do
if ping -c 1 "$host" >/dev/null 2>/dev/null ; then
echo "$host : REACHABLE";
else
echo "$host : UNREACHABLE";
fi
done