make outputs even more Kik compliant
This commit is contained in:
parent
324ecd76ce
commit
e4666df358
3 changed files with 4 additions and 4 deletions
|
@ -1,3 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
grep -Roh '\w*' "$1" | sort | uniq -c | sort -nr
|
||||
grep -Roh '\w*' "$1" | sort | uniq -c
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
for word in $(grep -Roh '\w*' "$1" | sort | uniq)
|
||||
do
|
||||
echo "$(grep -lRw "$word" "$1" | wc -l) $word"
|
||||
done | sort -r
|
||||
echo "$word: $(grep -lRw "$word" "$1" | wc -l)"
|
||||
done | sort -n
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
for word in $(grep -Roh '\w*' "$1" | sort | uniq)
|
||||
do
|
||||
occurences=$(grep -REn "($word.*){2}" "$1")
|
||||
occurences=$(grep -REn ".*\b$word\b.*\b$word\b.*" "$1")
|
||||
[ -n "$occurences" ] && printf '%s:\n%s\n' "$word" "$occurences"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue