Basically I have ~25 gz files that I need to search for certain text.
Say my first criteria is xx, and the second is yy
I have gzegrep available, but I can't seem to find anything on the web that allows me to basically use an "and" for the expressions. What may be complicating matters is that xx and yy are on different lines. However, I know the patten of the text (yy is 5 lines below xx)
Is this even possible?
I tried using egrep on a file with the same text values that is not zipped, just to get the format correct as gzegrep invokes egrep
egrep "(33336|751)" /file
I learned this is "or" not and
egrep -e 33336 -e 751 /file
same result as the "or" above
Say my first criteria is xx, and the second is yy
I have gzegrep available, but I can't seem to find anything on the web that allows me to basically use an "and" for the expressions. What may be complicating matters is that xx and yy are on different lines. However, I know the patten of the text (yy is 5 lines below xx)
Is this even possible?
I tried using egrep on a file with the same text values that is not zipped, just to get the format correct as gzegrep invokes egrep
egrep "(33336|751)" /file
I learned this is "or" not and
egrep -e 33336 -e 751 /file
same result as the "or" above
