mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 00:32:34 +01:00
Merge pull request #335 from konstruktoid/issue330
sed option extravaganza #330
This commit is contained in:
commit
9dd2fa5ce0
1 changed files with 2 additions and 2 deletions
|
@ -121,8 +121,8 @@ main () {
|
||||||
if [ -z "$check" ] && [ ! "$checkexclude" ]; then
|
if [ -z "$check" ] && [ ! "$checkexclude" ]; then
|
||||||
cis
|
cis
|
||||||
elif [ -z "$check" ] && [ "$checkexclude" ]; then
|
elif [ -z "$check" ] && [ "$checkexclude" ]; then
|
||||||
checkexcluded="$(echo "$checkexclude" | sed 's/,/|/g')"
|
checkexcluded="$(echo ",$checkexclude" | sed -e 's/^/\^/g' -e 's/,/\$|/g' -e 's/$/\$/g')"
|
||||||
for c in $(grep 'check_[0-9]_' functions_lib.sh | grep -vE "$checkexcluded"); do
|
for c in $(grep 'check_[0-9]_' functions_lib.sh | grep -vE "\'$checkexcluded\'"); do
|
||||||
"$c"
|
"$c"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue