Solaris find files within a certain date range containing a duplicate of a certain string

1

I'm trying to locate files created within a certain date range that contain the string "field" more than once. I've tried using:

find messagefolder -mtime -78 -exec egrep -il 'field.*field*' {} \;

but its only returning a couple of results.

John Smith

Posted 2019-03-20T20:07:26.080

Reputation: 11

egrep works one line at a time. If there are two distinct lines with a single field each, they won't match. Do you want them to match? Does this explain why you got fewer results than you expected? – Kamil Maciorowski – 2019-04-13T07:32:30.650

No answers