script: switch to multiline syntax
This commit is contained in:
parent
fc5825abba
commit
435ea0ce45
15
top_words.sh
15
top_words.sh
@ -7,7 +7,18 @@ url="${1:-}"
|
|||||||
basedir=$(dirname "$0")
|
basedir=$(dirname "$0")
|
||||||
|
|
||||||
if [[ "${url:-}" = "" ]]; then
|
if [[ "${url:-}" = "" ]]; then
|
||||||
grep --only-matching --extended-regexp '[a-zA-Z]{3,}' "$basedir/README.md" | tr '[:upper:]' '[:lower:]' | grep --invert-match --word-regexp --fixed-strings --file=stopwords.txt | sort | uniq --count | sort -n
|
grep --only-matching --extended-regexp '[a-zA-Z]{3,}' "$basedir/README.md" \
|
||||||
|
| tr '[:upper:]' '[:lower:]' \
|
||||||
|
| grep --invert-match --word-regexp --fixed-strings --file=stopwords.txt \
|
||||||
|
| sort \
|
||||||
|
| uniq --count \
|
||||||
|
| sort -n
|
||||||
else
|
else
|
||||||
curl "$url" | grep --only-matching --extended-regexp '[a-zA-Z]{3,}' | tr '[:upper:]' '[:lower:]' | grep --invert-match --word-regexp --fixed-strings --file=stopwords.txt | sort | uniq --count | sort -n
|
curl "$url" \
|
||||||
|
| grep --only-matching --extended-regexp '[a-zA-Z]{3,}' \
|
||||||
|
| tr '[:upper:]' '[:lower:]' \
|
||||||
|
| grep --invert-match --word-regexp --fixed-strings --file=stopwords.txt \
|
||||||
|
| sort \
|
||||||
|
| uniq --count \
|
||||||
|
| sort -n
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user