Many times there will be a situation where we know the contents of the file but we don't have the details of the file name and its location.
In this case, just go to the parent folder and issue the below command.
You will get the details.
find . -type f -name "*.sh" -exec grep -il {} \;
Example:
find . -type f -name "*.sh" -exec grep -il JAVA_HOME {} \;
In this case, just go to the parent folder and issue the below command.
You will get the details.
find . -type f -name "*.sh" -exec grep -il
Example:
find . -type f -name "*.sh" -exec grep -il JAVA_HOME {} \;