support comments in test-ping

This commit is contained in:
Sandino Araico Sanchez 2017-02-02 17:41:36 -06:00
parent 3501bb9a69
commit 45b6b94ceb

View file

@ -11,11 +11,12 @@ for VLAN in {401..408} ; do
continue
fi
IP_LIST=`cat /etc/netdev/vlan.$VLAN.csv \
| sed 's/#.*$//' \
| cut -d ',' -f 3 \
| grep '^[0-9]' | sort`
for IP in $IP_LIST; do
echo -n "$IP - "
ping -c5 -f $IP | grep 'received'
ping -c100 -f $IP | grep 'received'
done
done