From f805c40856b41890be07fee1f25bde6c3ef0baee Mon Sep 17 00:00:00 2001 From: TheK4n Date: Wed, 13 Oct 2021 23:15:47 +0300 Subject: [PATCH] fix: extract func --- .bash_functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.bash_functions b/.bash_functions index cf09868..bcc0067 100644 --- a/.bash_functions +++ b/.bash_functions @@ -51,7 +51,8 @@ extract () { else if [ -f "$1" ]; then # if file exists local NAME - NAME=${1%.*.*} + NAME=${1%.*} + NAME=${NAME%.*} if [ -e "$NAME" ]; then echo "error: extract: '$NAME' exists" >&2