From a directory, I need to find all files that contain a decimal numbers say 42.7 AND the keyword "foo" or "goo". How could I achieve that?
Suppose I have a directory with three files
file1.txt
=======
double x = 2.7
foo();
file2.txt
===========
double u = 5.7
file3.txt
===========
goo(42.0);
The search command should give file1.txt and file3.txt. What is a search command to achieve this?
i searched for the solutions but all I could find deal with having the patterns simultaneously appearing in the same line. Also I got difficulty in dealing with the decimal dot.