nawk 'BEGIN { FS = "," }
nawk 'At the BEGINing set the Field Seperator to ","
$1 == '"$DATE2"'
check if the first field is equal to "$DATE2"
&& $3 == "ERROR"
Also check is the third field is equal to "ERROR"
{ print $5...