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 am trying to check large files for errors. I though I would reduce the list by looking only for files modified in the last day.
find . \( -type d ! -name . -prune \) -o \( -type f -name "*log*" -mtime -1 -print \)
now I need to check for errors in the list of files but only want...
I need to grep for strings in a group of files, but only if the last assess time is within the past 24 hours.
I looked at Find, but the problem is it runs down subdirectories and there are a lot of them.
How would you script this?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.