I need to find the most frequent word of each file in a directory and print it like this :12 my /home/test/file1.txt5 you /home/test/file3.txt7 hello /home/test/file4.txtI tried:for tmp in <path>     do   tr -c '[:alnum:]' '[\n*]' < $tmp | sort | uniq -c | sort -nr | head  -1    done   It doesn't work
How to find the most frequent word of each file in a directory?
bash;text processing;files