From 9d8ca326589105fe09ebb13fca6b581ce198a6e0 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 7 Jul 2016 23:21:16 -0400 Subject: [PATCH] Adds .misc_function.sh to project --- .misc_functions.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .misc_functions.sh diff --git a/.misc_functions.sh b/.misc_functions.sh new file mode 100644 index 000000000..e775c2a89 --- /dev/null +++ b/.misc_functions.sh @@ -0,0 +1,13 @@ +# download files to /tmp directory +function wdownload { + URL="$1" + FILENAME="$(basename $URL)" + + wget -O /tmp/"$FILENAME" $URL >/dev/null && open /tmp && echo "Downloaded to: /tmp/$FILENAME" || echo "Error ..." +} + +# spell checker +function wspcheck { + if [ $# -ge 1 -a -f "$1" ] && input="$1" || input="-" + cat "$input" | tr '[:upper:]' '[:lower:]' | tr -cd '[:alpha:]_ \n' | tr -s ' ' '\n' | sort | comm -23 - ~/english_words.txt +}