How can we count how many times each word appears in a GB text file?
This command might help you:
Text file named as example.txt containing:
This is a sample demo text file that contains many example words in it and to check those occurances we'll be using a linux command for that which gives us count of example keyword in the text file. Let's put some more example words into it. example, example & example.
Command to check the occurances count for any particular word:
$ tr '[:space:]' '[\n*]' < demo.txt | grep -i -c example
Get Answers For Free
Most questions answered within 1 hours.