I am having a hard time understanding what the following grep command is actually doing and would like to get some guidance. I have tried to search everywhere online and even tried looking with the man.
Here isConcerning the command(s):
path=$1 # ---> I am not entirely sure what this means either
if grep -q -rHl --include \*.c --include \*.h "int main" $path
So what I do understand is that it is recursively looking for .c and .h files which include "int main" within their contents and wants to echo the name of the file as well.
But what exactly does the "$path" mean and do?