wilmington
Technical User
I need help getting the filename out with my print statement. I want to prefix each matching line with the filename.
I am reading through a list of files in $logs and printing lines with error: and matching date.
$log |awk -vdd=`date +%d` '{ if ($3==dd && /error:/) print }' >>test.out
how can I prefix the filename with each matching line of output.
any help would be great.
thanks
I am reading through a list of files in $logs and printing lines with error: and matching date.
$log |awk -vdd=`date +%d` '{ if ($3==dd && /error:/) print }' >>test.out
how can I prefix the filename with each matching line of output.
any help would be great.
thanks