A
$(mgmt_cli --ignore-errors true -r true -d $1 -f json $line > error.log 2>&1)
bash -x
) выглядит вот так:+ read line
'+ mgmt_cli --ignore-errors true -r true -d Domain -f json add host name '"HOST"' ip-address '"10.10.10.10"' color '"dark' 'gold"
Error: The parameters of add-host command should be provided in pairs (key and value). You have provided an odd number of parameters which suggests that you are probably missing a parameter.