#!/bin/bash


[ function ]; dopings() {
  FILE=$(date +.%w.%H)
  cat targets | while true; do
    read i
    if [ "$i" == "" ]; then
      break;
    fi
    (ping  -c 1 $i || echo time=0 ms) | grep time >> data/$i$FILE
  done
}


while true; do
  sleep 1m
  dopings &
done


