I am looking for some help using grep or grep like tools. This includes, but is not limited to, grep, egrep, awk, sed, or some other tool that is used to find matches. But I will just call it grep for the rest of the question.
I am looking for a quick way to grep a file for matching, and I am also looking for the fastest way to grep a file for matching and only return the line number to the remaining match string. I donβt mind if the syntax is complicated, while its fast, Iβm going to use it in the complexity of the program , It's not a problem.
I also need this method to work if I need a regex for a pattern so that I can also search for a range. Therefore, if I need to search for all numbers less than 10, if commmand supports it by default, or if it should be some kind of regular expression, I'm just looking for the fastest method I can find.
thank.
Edit
The files I'm working with will be very large, my test file is 1.9gb
source
share