newcomer linux, would like to ask how to use grep to match a specified two-digit number.
for example, the original file has various times:
I now want to specify a match between 18:00 and 22:00. How do I use grep?
newcomer linux, would like to ask how to use grep to match a specified two-digit number.
for example, the original file has various times:
I now want to specify a match between 18:00 and 22:00. How do I use grep?
grep -Pe '\d{4}-\d{2}-\d{2},(18|19|20|21|22):.*' <>
< H2 > reference < / H2 >
man grep
Previous: Python selenium crawler
Next: How can I achieve the function of jumping to a specified line?