diff --git a/bin/cp-into-docker-run b/bin/cp-into-docker-run index c5a0d4e2..6d1aff02 100755 --- a/bin/cp-into-docker-run +++ b/bin/cp-into-docker-run @@ -29,7 +29,7 @@ redPrint() { } die() { - redPrint "Error: $*" 1>&2 + redPrint "Error: $*" >&2 exit 1 } @@ -242,7 +242,7 @@ trap cleanupWhenExit EXIT ######################################## logAndRun() { - $verbose && printf '%s\n' "[$PROG] $*" 1>&2 + $verbose && printf '%s\n' "[$PROG] $*" >&2 "$@" } diff --git a/bin/show-busy-java-threads b/bin/show-busy-java-threads index 27f056ea..8097444c 100755 --- a/bin/show-busy-java-threads +++ b/bin/show-busy-java-threads @@ -101,7 +101,7 @@ blueOutput() { } die() { - redOutput "Error: $*" 1>&2 + redOutput "Error: $*" >&2 exit 1 } diff --git a/bin/uq b/bin/uq index d05d62b2..fb181613 100755 --- a/bin/uq +++ b/bin/uq @@ -9,7 +9,7 @@ # # @online-doc https://github.com/oldratlee/useful-scripts/blob/dev-2.x/docs/shell.md#-uq # @author Zava Xu (zava.kid at gmail dot com) -# @author Jerry Lee (oldratlee at gmail dot com)# NOTE about Bash Traps and Pitfalls: +# @author Jerry Lee (oldratlee at gmail dot com) # # NOTE about Bash Traps and Pitfalls: # @@ -60,7 +60,7 @@ yellowPrint() { } die() { - redPrint "Error: $*" 1>&2 + redPrint "Error: $*" >&2 exit 1 } diff --git a/legacy-bin/cp-svn-url b/legacy-bin/cp-svn-url index 970147b5..0866c4ed 100755 --- a/legacy-bin/cp-svn-url +++ b/legacy-bin/cp-svn-url @@ -78,7 +78,7 @@ readonly dir="${1:-.}" # NOTE: DO NOT declare var url as readonly in ONE line! url="$(svn info "${dir}" | awk '/^URL: /{print $2}')" if [ -z "${url}" ]; then - echo "Fail to get svn url!" 1>&2 + echo "Fail to get svn url!" >&2 exit 1 fi diff --git a/test-cases/bump-scripts-version.sh b/test-cases/bump-scripts-version.sh index 118d1f1f..32ab7568 100755 --- a/test-cases/bump-scripts-version.sh +++ b/test-cases/bump-scripts-version.sh @@ -49,7 +49,7 @@ logAndRun() { } die() { - redPrint "Error: $*" 1>&2 + redPrint "Error: $*" >&2 exit 1 } diff --git a/test-cases/my_unit_test_lib.sh b/test-cases/my_unit_test_lib.sh index fe0c6c78..907c1e20 100644 --- a/test-cases/my_unit_test_lib.sh +++ b/test-cases/my_unit_test_lib.sh @@ -40,7 +40,7 @@ fail() { } die() { - redEcho "Error: $*" 1>&2 + redEcho "Error: $*" >&2 exit 1 }