Trims fat and renames files
This commit is contained in:
parent
6021ad3194
commit
4563550969
40 changed files with 233 additions and 352 deletions
40
functions/misc_functions.sh
Normal file
40
functions/misc_functions.sh
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# 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
|
||||
}
|
||||
|
||||
|
||||
# fuzzily search through dirs stack
|
||||
function wfd {
|
||||
dir=$(dirname $(fzf)) && pushd "$dir" >/dev/null
|
||||
}
|
||||
|
||||
|
||||
# pushd into a directory on your dirs stack
|
||||
function wpushd {
|
||||
dir="$(dirs | tr ' ' '\n' | fzf)" && pushd "$dir"
|
||||
}
|
||||
|
||||
|
||||
# trims leading and trailing whitespace
|
||||
function trim {
|
||||
input="$1"
|
||||
|
||||
echo "${input//[[:blank:]]/}"
|
||||
}
|
||||
|
||||
|
||||
function wgreviewers {
|
||||
echo "BJ Warshaw\nDaniel Wasilewski\nSean Sullivan\nCharles Morrissey\nRyan Balch\nZach Goldstein\nWilliam Anderson"
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue