asd1234qwerty
Programmer
i'm trying to get the user to enter a word, then the script should search for how many of that word exists in the file. For example, I want it to say, "There are 7 'and' words in the file", or "There are 5 'the' words in the file" etc...
I have the following which I used to find a specific character, but I need to change this round to find words instead.
tr -dc $char < text | wc -c
Thanks for your help.
I have the following which I used to find a specific character, but I need to change this round to find words instead.
tr -dc $char < text | wc -c
Thanks for your help.