mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-06 00:39:44 +01:00
- save 1x sed in count_lines/words
This commit is contained in:
parent
83e6bf6760
commit
c785087d15
@ -507,10 +507,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() {
|
||||
|
Loading…
Reference in New Issue
Block a user