I have some .sh and .bat files in a directory. I want to list only the .sh files that has the word "JAVA_HOME".
grep -rl "JAVA_HOME" | grep "*.sh",
grep -rl "JAVA_HOME" *.sh and few other random things, but none of them worked. Can someone help me with this? Thank you.