Fix -e option last entry is not excluded in docker

Signed-off-by: Cheng-Li Jerry Ma <chengli.ma@gmail.com>
This commit is contained in:
Cheng-Li Jerry Ma 2018-11-08 15:05:28 -07:00
parent db8a8c0d96
commit 37ccf4dbcf

View file

@ -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
grep 'check_[0-9]' functions_lib.sh | grep -vE "$checkexcluded" | while read -r c; do
"$c"
done
else