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