diff options
author | Adam Hovorka <[email protected]> | 2018-09-30 20:36:27 -0600 |
---|---|---|
committer | Adam Hovorka <[email protected]> | 2018-09-30 20:36:27 -0600 |
commit | 9c1224578330135406ddc9f461184ff1f6756c0c (patch) | |
tree | 0afbaceff14b98919c04048bdf5d11a5a850289c /base/pr-weasel | |
parent | fc7fc47c946f49040df60dc3e3c4499399975125 (diff) |
Add some more random utilities/functions
Diffstat (limited to 'base/pr-weasel')
-rwxr-xr-x | base/pr-weasel | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/base/pr-weasel b/base/pr-weasel new file mode 100755 index 0000000..052dacd --- /dev/null +++ b/base/pr-weasel @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +# Weasel words +# http://matt.might.net/articles/shell-scripts-for-passive-voice-weasel-words-duplicates/ + +weasels="many|various|very|fairly|several|extremely\ +|exceedingly|quite|remarkably|few|surprisingly\ +|mostly|largely|huge|tiny|((are|is) a number)\ +|excellent|interestingly|significantly\ +|substantially|clearly|vast|relatively|completely" + +wordfile="" + +# Check for an alternate weasel file +if [ -f $HOME/etc/words/weasels ]; then + wordfile="$HOME/etc/words/weasels" +fi + +if [ -f $WORDSDIR/weasels ]; then + wordfile="$WORDSDIR/weasels" +fi + +if [ -f words/weasels ]; then + wordfile="words/weasels" +fi + +if [ ! "$wordfile" = "" ]; then + weasels="xyzabc123"; + for w in `cat $wordfile`; do + weasels="$weasels|$w" + done +fi + +if [ "$1" = "" ]; then + echo "Usage: `basename $0` <file> ..." + exit +fi + +egrep -i -n --color "\\b($weasels)\\b" $* + +exit $? |