mute the error message using bash3, see #697 (2.8)

This commit is contained in:
Dirk 2017-04-06 11:27:40 +02:00
parent 6df18caba4
commit baf1778540

View File

@ -518,13 +518,13 @@ strip_trailing_space() {
echo "${1%"${1##*[![:space:]]}"}" echo "${1%"${1##*[![:space:]]}"}"
} }
if [[ "$BASH_VERSINFO" == 3 ]]; then
toupper() { echo -n "${1^^}" ; } # older bash can do this only (MacOS X), even SLES 11, see #697
tolower() { echo -n "${1,,}" ; }
if ! toupper aaa 2>&1 >/dev/null; then
# older bash can't do this (MacOS X), even SLES 11, see #697
toupper() { tr 'a-z' 'A-Z' <<< "$1"; } toupper() { tr 'a-z' 'A-Z' <<< "$1"; }
tolower() { tr 'A-Z' 'a-z' <<< "$1"; } tolower() { tr 'A-Z' 'a-z' <<< "$1"; }
else
toupper() { echo -n "${1^^}"; }
tolower() { echo -n "${1,,}"; }
fi fi
is_number() { is_number() {