In case you don't mind grep, you can use grep with one word to recursively search files and return the filename, and feed that list of filenames to another grep with a second search word, something like:
grep -ril batter <targetdirectory> | xargs grep -i laptop Or some variant of that. On Thu, Oct 1, 2020 at 11:15 PM Keith Lofstrom <kei...@kl-ic.com> wrote: > > The why: > > On plug-talk a few years ago, someone suggested a vendor for > aftermarket laptop batteries. I can't find that email using > simple "grep" in the hundreds of megabytes of plug emails > I've saved over the decades. Tens of thousands of hits for > laptop, thousands for battery, thousands for ".com". > > Of course, "someone" can tell me again ... > > The what: > > ... but I prefer to learn about more capable tools than > grep. Ideally, a (hypothetical) text tool designed to > search for multiple command line strings anywhere in a > file, select only those files that match some or many of > those strings (with adjustable threshold), then present > the file name and the matched lines in a human-readable > format. > > With this tool and some patience, a few passes through my > megabytes of plug emails might lead me to that vaguely > recalled email or the forgotten "someone". > > As I get old and my memory fails, such a tool will help > me discover associations that I used to be able to find > in my head. > > Keith > > -- > Keith Lofstrom kei...@keithl.com > _______________________________________________ > PLUG: https://pdxlinux.org > PLUG mailing list > PLUG@pdxlinux.org > http://lists.pdxlinux.org/mailman/listinfo/plug _______________________________________________ PLUG: https://pdxlinux.org PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug