word-frequency

This commit is contained in:
Gleb Koval 2021-11-08 20:28:06 +00:00
parent 08c533bcf9
commit 27ba58ad99
No known key found for this signature in database
GPG Key ID: 7C89CDC822F8392B
1 changed files with 3 additions and 0 deletions

3
word-frequency/sol.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
grep -oE "[a-z]+" words.txt | sort -u | xargs -I{} sh -c 'echo {} $(grep -oP "(?<![a-z]){}(?![a-z])" words.txt | wc -w)' | sort -nr -t " " -k 2