diff --git a/bin/pt-ioprofile b/bin/pt-ioprofile index 0e81b8af..f73b97ef 100755 --- a/bin/pt-ioprofile +++ b/bin/pt-ioprofile @@ -870,7 +870,7 @@ main() { # Execute the program if it was not included from another file. # This makes it possible to include without executing, and thus test. if [ "${0##*/}" = "$TOOL" ] \ - || [ "${0##*/}" = "bash" -a "$_" = "$0" ]; then + || [ "${0##*/}" = "bash" -a "${_:-""}" = "$0" ]; then # Parse command line options. We must do this first so we can # see if --daemonize was specified. diff --git a/bin/pt-mysql-summary b/bin/pt-mysql-summary index 48ea5c9d..8691b59f 100755 --- a/bin/pt-mysql-summary +++ b/bin/pt-mysql-summary @@ -2421,7 +2421,7 @@ main() { # Execute the program if it was not included from another file. # This makes it possible to include without executing, and thus test. if [ "${0##*/}" = "$TOOL" ] \ - || [ "${0##*/}" = "bash" -a "$_" = "$0" ]; then + || [ "${0##*/}" = "bash" -a "${_:-""}" = "$0" ]; then # Set up temporary dir. mk_tmpdir diff --git a/bin/pt-pmp b/bin/pt-pmp index eb545746..b8b00dba 100755 --- a/bin/pt-pmp +++ b/bin/pt-pmp @@ -215,7 +215,7 @@ main() { # Execute the program if it was not included from another file. This makes it # possible to include without executing, and thus test. if [ "${0##*/}" = "$TOOL" ] \ - || [ "${0##*/}" = "bash" -a "$_" = "$0" ]; then + || [ "${0##*/}" = "bash" -a "${_:-""}" = "$0" ]; then mk_tmpdir main "$@" rm_tmpdir diff --git a/bin/pt-sift b/bin/pt-sift index 5be9e9b6..16df99ac 100755 --- a/bin/pt-sift +++ b/bin/pt-sift @@ -587,7 +587,7 @@ main() { # Execute the program if it was not included from another file. This makes it # possible to include without executing, and thus test. if [ "${0##*/}" = "$TOOL" ] \ - || [ "${0##*/}" = "bash" -a "$_" = "$0" ]; then + || [ "${0##*/}" = "bash" -a "${_:-""}" = "$0" ]; then main "${@:-""}" fi diff --git a/bin/pt-stalk b/bin/pt-stalk index 3add242b..8adbd5bc 100755 --- a/bin/pt-stalk +++ b/bin/pt-stalk @@ -1310,7 +1310,7 @@ main() { # Execute the program if it was not included from another file. # This makes it possible to include without executing, and thus test. if [ "${0##*/}" = "$TOOL" ] \ - || [ "${0##*/}" = "bash" -a "$_" = "$0" ]; then + || [ "${0##*/}" = "bash" -a "${_:-""}" = "$0" ]; then # Parse command line options. We must do this first so we can # see if --daemonize was specified. diff --git a/bin/pt-summary b/bin/pt-summary index 3fc9c51a..32e864b7 100755 --- a/bin/pt-summary +++ b/bin/pt-summary @@ -2289,7 +2289,7 @@ sigtrap() { local PTFUNCNAME=sigtrap; # Execute the program if it was not included from another file. This makes it # possible to include without executing, and thus test. if [ "${0##*/}" = "$TOOL" ] \ - || [ "${0##*/}" = "bash" -a "$_" = "$0" ]; then + || [ "${0##*/}" = "bash" -a "${_:-""}" = "$0" ]; then # Set up temporary dir. mk_tmpdir