To investigate within logs, I am trying to find the very first time a vulnerability in a workflow has been exploited.
The pattern is on multiple lines.
The pattern would be
AAAAAAAAA
BBBBBBBBB
CCCCCCCCC
The problem is that
AAAAAAAAA
or
BBBBBBBBB
or
CCCCCCCCC
Can be found anywhere indivdually in the log without showing the vulnerability; it is the exact pattern in this exact order that will help me.
For example
grep -Ei "AAAAAAAAA|BBBBBBBBB|CCCCCCCCC" logfile
does not help me since all the lines with individual occurence of AAAAAAAAA BBBBBBBBB CCCCCCCCC
will be there.
How can I solve this?
AAAAA.*BBBBB.*CCCCC
and each candidateAAAAA
would force grep to span the rest of the "Big" file. – Philip Couling Apr 03 '21 at 23:16