calculate frequency of word acording to length in text

This commit is contained in:
Kuba 2023-03-21 22:32:15 +01:00
parent d6be2a2ce9
commit 6dd47bcdb5

3
analysis/len_freq.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
#calculate no occurances of words depending on length
bzcat $1 | tr -cs '[:alnum:]' ' ' | tr ' ' '\n' | awk '{print length}' | sort -n | uniq -c > len_freq.txt