#!/usr/bin/awk -f /No Errors Logged/ { exit 0 } /ATA Error Count: ([0-9]+)/ { print $1 " " $2 " " $3 " " $4 ; exit $4 }