I need some Linux grep command basics help. What I need to do is find out how many times a word appeared in text file. Right now I run grep command:
grep 'my-word' file
It shows me 100s of line. Instead of I need to show a count of ‘my-word’ and store in Linux shell variable.