Generate a 10MiB file full of words using /dev/urandom.
Write a script which will
- Count the number of words
- count the number of distinct words
- count the ten most common words
./words.sh command
COMMANDS
help
prints this menu.
generate <size by MB>
generate a file full of words using
/dev/urandom in current directory
named words, default size is 10MB.
count
print the number of words, number of
distinct words and ten most common words
appeared in the 'words' file.