From d181bb47a73f7bb5e22ee0c2057a28c6b5b0c1f9 Mon Sep 17 00:00:00 2001 From: bretello Date: Fri, 13 Mar 2020 21:33:53 +0100 Subject: [PATCH] functions: add unzipd function (unzip -d) --- functions.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/functions.sh b/functions.sh index c4f9cbb..b8fbe93 100755 --- a/functions.sh +++ b/functions.sh @@ -232,6 +232,14 @@ function pipupdate(){ done } +function unzipd { + zip_file="$1" + filename=$(basename -- "$zip_file") + extension="${filename##*.}" + name="${filename%.*}" + unzip -d "$name" "$zip_file" +} + # dotfiles user functions if [[ -f $HOME/.dotfiles_functions ]]; then source "$HOME/.dotfiles_functions"