Adds .misc_function.sh to project
This commit is contained in:
parent
16f03771d4
commit
9d8ca32658
1 changed files with 13 additions and 0 deletions
13
.misc_functions.sh
Normal file
13
.misc_functions.sh
Normal file
|
@ -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
|
||||||
|
}
|
Loading…
Reference in a new issue