Discuss the below:
Q: Create a Unix shell script that searches for a text file with most occurrences of a given keyword. For instance, if I would like to search for a script with most usages of if statement, I would execute:
find_most_relevant.sh /home/student/myscripts if
The script find_most_relevant.sh should take two arguments. The first one is the directory where text files are located. The second argument is a keyword. The output of the script should either state:
No file with word found in the directory
Or
file : found X occurrences of word
(for the file with most occurrences of keyword only)