I am new to writing Shell Scripts and am having some difficulties.
What I Want To Achieve
I have an array of strings in scriptOne.sh
that I want to pass to scriptTwo.sh
What I Have Done So Far
I can execute the second script from inside the first using ./scriptTwo.sh
and I have passed string variables from one to the other using ./scriptTwo.sh $variableOne
.
The issues are when I try to pass an array variable it doesn't get passed. I have managed to get it to pass the first entry of the array using ./scriptTwo.sh "${array[@]}"
however this is only one of the entries and I need all of them.
Thanks in advance for your help