I have a var which is a string that contains several words like this:
my_var="foo bar baz"
I'd like to call another script and pass in my_var. I want this second script to see three arguments foo bar baz instead of a single argument "foo bar baz"
How is this done? Here's what currently have:
text_output=$( /bin/bash /the/second/script.sh ${my_var} )
This second script is expecting any number of arguments. And currently it says it is getting one argument. Could the syntax ${} be the issue?
${my_var}, something in your script is miscounting the number of arguments it is receiving.