about summary refs log tree commit diff
path: root/.misc_functions.sh
diff options
context:
space:
mode:
Diffstat (limited to '.misc_functions.sh')
-rw-r--r--.misc_functions.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/.misc_functions.sh b/.misc_functions.sh
new file mode 100644
index 000000000000..e775c2a890dd
--- /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
+}