I do have 2 Shell Scripts. The first one triggers the second one and adds some parameters. The second one calls a command and adds the parameters from the first script as parameters for the command.
The first looks something like:
#!/usr/bin/env bash
ADDITIONAL_ARGUMENTS='--set "args={/bin/bash,-c,cd /var/www && sudo -u www-data bash scripts/system/update.sh}"'
SUPER_PARAMS=${ADDITIONAL_ARGUMENTS} my_second_script.sh
Then, the second script does something like:
#!/usr/bin/env bash
randomBinary --some-hardcoded-parameters \
"${SUPER_PARAMS}"
What I would expect to have is an output of:
randomBinary --some-hardcoded-parameters --set "args={/bin/bash,-c,cd /var/www && sudo -u www-data bash scripts/system/update.sh}"
But instead, the call looks like:
randomBinary --some-hardcoded-parameters '--set "args={/bin/bash,-c,cd /var/www && sudo -u www-data bash scripts/system/update.sh}"'
I tried 2 days quoting the param correctly, but no results.