move reusable code bricks to aliases/functions
- new aliases to be used in pipes
This commit is contained in:
@ -467,14 +467,14 @@ function dl_stopwords() {
|
||||
}
|
||||
function file_getwords() {
|
||||
dl_stopwords
|
||||
\cat "$1" | tr '[:upper:]' '[:lower:]' | \grep -o -E '\w{3,}' | \grep --invert-match --word-regexp --fixed-strings --file="$HOME/stopwords.txt" | \sed 's/s$//g' | \sed 's/ing$//g' | sort | uniq -c | sort --numeric-sort --reverse
|
||||
\cat "$1" | tr '[:upper:]' '[:lower:]' | \grep -o -E '\w{3,}' | \grep --invert-match --word-regexp --fixed-strings --file="$HOME/stopwords.txt" | \sed 's/s$//g' | \sed 's/ing$//g' | sort_count
|
||||
}
|
||||
function file_getpairs() {
|
||||
dl_stopwords
|
||||
\cat "$1" | tr '[:upper:]' '[:lower:]' | \grep -o -E '\w{3,} \w{3,}' | \grep --invert-match --word-regexp --fixed-strings --file="$HOME/stopwords.txt" | \sed 's/s$//g' | \sed 's/ing$//g' | sort | uniq -c | sort --numeric-sort --reverse
|
||||
\cat "$1" | filter_pairs
|
||||
}
|
||||
function file_dups() {
|
||||
\cat "$1" | sort | uniq -c | sort -nr
|
||||
\cat "$1" | sort_count
|
||||
}
|
||||
function foreach_run() {
|
||||
find . -name "$1" -exec "$2" {} \;
|
||||
|
Reference in New Issue
Block a user