Search this site


Metadata

Articles

Projects

Presentations

<3 xapply.

xapply 'ping -t 1 -c 1 %1 > /dev/null 2>&1; A=$?; echo -n "%1 - "; [ $A -eq 0 ] && echo "ONLINE" || echo "***DOWN***"' `cat hostlist`

Outputs:

project1 - ONLINE
mokey - ***DOWN***
boober - ONLINE
wimbley - ONLINE
doozer - ONLINE
felix - ONLINE
red - ***DOWN***
sprocket - ONLINE
henchy - ONLINE
falcon - ONLINE
talon - ONLINE
junior - ONLINE
doc - ONLINE
eagle - ***DOWN***