gudii9
asked on
grep request differences
hi,
what are differences between below 3 grep requests
zgrep 'RPT|O|BundleShowing' nine.log.20171029.gz | grep 'Oct-29 23:' | wc -l
zgrep 'RPT|O|BundleShow' nine.log.20171029.gz | grep 'Oct-29 23:' | wc -l
zgrep 'RPT|O|BundleShowing' nine.log.20171029.gz | grep 'Oct-29 23:24' | wc -l
if i have to search from yesterday 11 pm till today morning say 6am how to refine my query.
please advise
what are differences between below 3 grep requests
zgrep 'RPT|O|BundleShowing' nine.log.20171029.gz | grep 'Oct-29 23:' | wc -l
zgrep 'RPT|O|BundleShow' nine.log.20171029.gz | grep 'Oct-29 23:' | wc -l
zgrep 'RPT|O|BundleShowing' nine.log.20171029.gz | grep 'Oct-29 23:24' | wc -l
if i have to search from yesterday 11 pm till today morning say 6am how to refine my query.
please advise
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
grep may not be the best tool for matching a range of timeswhat is the best tool
How tolerant are you of matching more than requested? Do you mind getting all of yesterday, or all of today?my requirement keep changing. tomorrow i may want to search on whole last week data or whole last month date.
How about missing yesterday from 11pm to 11:59:59?
any perfect examples to tweak those example queries?
ASKER
The first and third may not match BundleShowstoppers or BundleShowcasingdoes second match?
is it like wild card search if i do as below
zgrep 'RPT|O|BundleShow' nine.log.20171029.gz | grep 'Oct-29 23:' | wc -l
is above same as below (lets say 4th one)
zgrep 'RPT|O|BundleShow*' nine.log.20171029.gz | grep 'Oct-29 23:' | wc -l
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1. Provided best solution and answer to next queries
2. Tested given solutions
3. Inactive for 14 days
2. Tested given solutions
3. Inactive for 14 days
ASKER