Fix SC2091 (execute result of condition)

For some reason, the echo|grep pattern was enclosed four times in a $()
operation. Nothing happened, since grep is always invoked with -q
(quiet, nothing printed to stdout).
This commit is contained in:
Jonas Weber 2018-10-04 22:22:22 +02:00
parent bcd7fbbcc4
commit 34b571b7d9
4 changed files with 4 additions and 4 deletions

View File

@ -84,7 +84,7 @@ DONE
if [ "$upload_file" ]; then
echo upload >> "$__messages_out"
# IPv6 fix
if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$')
if echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$'
then
my_target_host="[${__target_host}]"
else

View File

@ -44,7 +44,7 @@ basepresent="$(cat "$__object/explorer/basepresent")"
if [ "$state" = "present" ]; then
if [ "$basepresent" = "NONE" ]; then
# IPv6 fix
if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$')
if echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$'
then
my_target_host="[${__target_host}]"
else

View File

@ -40,7 +40,7 @@ basepresent="$(cat "$__object/explorer/basepresent")"
if [ "$state" = "present" ]; then
if [ "$basepresent" = "NONE" ]; then
# IPv6 fix
if $(echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$')
if echo "${__target_host}" | grep -q -E '^[0-9a-fA-F:]+$'
then
my_target_host="[${__target_host}]"
else

View File

@ -60,7 +60,7 @@ if [ "$state" = "present" ]; then
case "$property" in
gid)
if $(echo "$new_value" | grep -q '^[0-9][0-9]*$'); then
if echo "$new_value" | grep -q '^[0-9][0-9]*$'; then
field=4
else
# We were passed a group name. Compare the gid in