I have a word and I want to check what the percent of its appearance in a file ( according to the total number of word in the file ) ? For example if I have the word "you" and it appears 2 times in a file with 8 words the output will be 25%.
I tried: fgrep -ow