8 lines
143 B
Bash
8 lines
143 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
for word in $(grep -Roh '\w*' "$1" | sort | uniq)
|
||
|
do
|
||
|
echo "current word: $word"
|
||
|
grep -RE "($word.*){2}" "$1"
|
||
|
done
|