#!/bin/sh # # cluster-ping.sh, Copyright © 2013 Matteo Cypriani # # This program is free software. It comes without any warranty, to # the extent permitted by applicable law. You can redistribute it # and/or modify it under the terms of the Do What The Fuck You Want # To Public License, Version 2, as published by Sam Hocevar. See # http://sam.zoy.org/wtfpl/COPYING for more details. # # Ping a list of remote hosts using fping. if [ $# -ne 1 ] ; then echo "Usage: $0 " exit 1 fi HOSTS="$HOME/.config/cluster/$1.lst" shift echo "Using file '$HOSTS' as hosts' list." exec fping $(cat "$HOSTS") 2>/dev/null