mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
- save 1x sed in count_lines/words
This commit is contained in:
parent
b238fab3c1
commit
05a0e555a7
11
testssl.sh
11
testssl.sh
@ -517,10 +517,15 @@ hex2dec() {
|
||||
|
||||
# trim spaces for BSD and old sed
|
||||
count_lines() {
|
||||
wc -l <<<"$1" | sed 's/ //g'
|
||||
#echo "${$(wc -l <<< "$1")// /}"
|
||||
# ^^ bad substitution under bash, zsh ok. For some reason this does the trick:
|
||||
echo $(wc -l <<< "$1")
|
||||
}
|
||||
|
||||
count_words() {
|
||||
wc -w <<<"$1" | sed 's/ //g'
|
||||
#echo "${$(wc -w <<< "$1")// /}"
|
||||
# ^^ bad substitution under bash, zsh ok. For some reason this does the trick:
|
||||
echo $(wc -w <<< "$1")
|
||||
}
|
||||
|
||||
count_ciphers() {
|
||||
@ -8859,4 +8864,4 @@ fi
|
||||
exit $?
|
||||
|
||||
|
||||
# $Id: testssl.sh,v 1.549 2016/09/26 19:47:56 dirkw Exp $
|
||||
# $Id: testssl.sh,v 1.551 2016/09/29 18:59:12 dirkw Exp $
|
||||
|
Loading…
Reference in New Issue
Block a user