From 304094cbb23840000d0d0b3ed7013e55310ef572 Mon Sep 17 00:00:00 2001 From: Cheng-Li Jerry Ma Date: Thu, 8 Nov 2018 15:09:34 -0700 Subject: [PATCH] Fix -e option totalChecks and currentScore always 0 Signed-off-by: Cheng-Li Jerry Ma --- docker-bench-security.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-bench-security.sh b/docker-bench-security.sh index b850f00..dbb4640 100755 --- a/docker-bench-security.sh +++ b/docker-bench-security.sh @@ -126,7 +126,7 @@ main () { cis elif [ -z "$check" ] && [ "$checkexclude" ]; then checkexcluded="$(echo ",$checkexclude" | sed -e 's/^/\^/g' -e 's/,/\$|/g' -e 's/$/\$/g')" - grep 'check_[0-9]' functions_lib.sh | grep -vE "$checkexcluded" | while read -r c; do + for c in $(grep 'check_[0-9]' functions_lib.sh | grep -vE "$checkexcluded"); do "$c" done else