[solved] Weird behaviour of rclone

Hi guys, I'm refactoring a backup script... So to make it easier and run in a loop, I'm using the "jq" application to parse the json.

My script:

I read the json, get the fields and generate the parameters to run the script.

But I noticed that when I run the script it seems that rclone is getting lost with the double quotes, as if it understands that the double quotes are part of the string, but it is not. If I run the same line that generated in the log it works fine.

The log file

Any hints?

Hello guys

Sorry for this topic, I've solved this issue using an eval.
rclone_cmd="${rclone} ${command} ${source} ${provider}:${bucket}${destination} ${options} ${params} ${debug}"
eval ${rclone_cmd}

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.