about summary refs log blame commit diff
path: root/.misc_functions.sh
blob: e775c2a890ddbb94a1c18e4825b1564df111be8b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
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
}