Say I want to search for '123456789' and I want it to be near 'firstname'. Is there a way to do it?
I've 0 logic to do this. Maybe piping greps could work?
What kind of algorithm is best suited for this purpose?
Input:
search_string1='firstname' search_string2='123456789'
proximity_#_of_lines=10
Output:
Find search_string1 and search_string2 instance if they are 10 lines near each other. i.e if these two strings are 10 lines near each other then display it to a file.
123456789if it's within 10 lines of a line containing the substringfirstname, or the other way around? Is your data in some common format, like JSON, YAML, CSV, XML or other?