sleep 1 >> kill.log 2>&1 /dev/null tail -10 main.log | egrep -w 'IP|socket|Service|400|ECONNREFUSED|ECONNRESET|ENETUNREACH|503|Unexpected|successfully!' | cut -b10-55 | sort -u > error tail -1 error > bug.log rm error