diff --git a/bin/pt-mext b/bin/pt-mext index ee8438d1..b19733af 100755 --- a/bin/pt-mext +++ b/bin/pt-mext @@ -127,9 +127,10 @@ usage() { usage_or_errors() { local file="$1" + local version="" if [ "$OPT_VERSION" ]; then - local version=$(grep '^pt-[^ ]\+ [0-9]' "$file") + version=$(grep '^pt-[^ ]\+ [0-9]' "$file") echo "$version" return 1 fi diff --git a/bin/pt-mysql-summary b/bin/pt-mysql-summary index 4365ca4d..3e81af23 100755 --- a/bin/pt-mysql-summary +++ b/bin/pt-mysql-summary @@ -88,9 +88,10 @@ usage() { usage_or_errors() { local file="$1" + local version="" if [ "$OPT_VERSION" ]; then - local version=$(grep '^pt-[^ ]\+ [0-9]' "$file") + version=$(grep '^pt-[^ ]\+ [0-9]' "$file") echo "$version" return 1 fi diff --git a/bin/pt-summary b/bin/pt-summary index 6630da75..03516550 100755 --- a/bin/pt-summary +++ b/bin/pt-summary @@ -95,9 +95,10 @@ usage() { usage_or_errors() { local file="$1" + local version="" if [ "$OPT_VERSION" ]; then - local version=$(grep '^pt-[^ ]\+ [0-9]' "$file") + version=$(grep '^pt-[^ ]\+ [0-9]' "$file") echo "$version" return 1 fi diff --git a/lib/bash/parse_options.sh b/lib/bash/parse_options.sh index 76b94c5d..297b99d4 100644 --- a/lib/bash/parse_options.sh +++ b/lib/bash/parse_options.sh @@ -76,9 +76,10 @@ usage() { usage_or_errors() { local file="$1" + local version="" if [ "$OPT_VERSION" ]; then - local version=$(grep '^pt-[^ ]\+ [0-9]' "$file") + version=$(grep '^pt-[^ ]\+ [0-9]' "$file") echo "$version" return 1 fi