diff --git a/tarback.sh b/tarback.sh index 56780e9..b187d0a 100755 --- a/tarback.sh +++ b/tarback.sh @@ -125,7 +125,6 @@ while getopts "$short_options" arg; do exit 1 fi done - shift 2 ;; *) echo "unknown option $1" >&2 @@ -134,6 +133,8 @@ while getopts "$short_options" arg; do esac done +shift $((OPTIND-1)) + case "$1" in create) shift diff --git a/tarback/ssh.sh b/tarback/ssh.sh index 3326ee1..f70a5fd 100644 --- a/tarback/ssh.sh +++ b/tarback/ssh.sh @@ -23,7 +23,6 @@ while getopts "$short_options" arg; do case "$arg" in s) TARBACK_REMOTE="$OPTARG" - shift 2 ;; *) echo "unknown option $1" >&2