while [ ! -f /home/stopPing.txt ] ; do cat /home/ipListforPing.txt | while read output do timestamp=$(date +%d-%m-%Y_%H-%M-%S) timeout 2s ping -qc1 $output