The reach
command is a simple wrapper around ping
and ping6
.
reach
has a configuration file to adjust its behavior. Benefits:
-
Check exit status to determine reachability of a host or IP. The exit status of
ping
orping6
is passed through as the exit status ofreach
. -
No output to
/dev/stdout
-
Errors go to
/dev/stderr
-
Reduces complexity of other scripts
for x in $(seq 1 5); do echo -n "server${x}.example.com: " reach server${x}.example.com || { echo; continue; } ssh server${x}.example.com "uptime" done
Please report bugs and request enhancements to http://github.com/jumanjiman/reach/issues
Paul Morgan <jumanjiman@gmail.com>