mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-11 03:00:57 +01:00
mute the error message using bash3, see #697 (2.8)
This commit is contained in:
parent
6df18caba4
commit
baf1778540
10
testssl.sh
10
testssl.sh
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user