#! /bin/bash ping $1 -c 1 > /dev/null || echo "$(date +"%D - %H:%M:%S"): $2 down" >> $2