I am new to shell scripting and have some difficulties.
What i want to achieve
I have an array of strings in scriptOne.sh which I want to pass to scriptTwo.sh
What have i done so far
I can execute the second script from within the first using ./scriptTwo.sh and I passed the string variables from one to the other using ./scriptTwo.sh $variableOne .
The problem is that when I try to pass an array variable, it is not passed. I managed to get it to pass the first record of the array using ./scriptTwo.sh "${array[@]}" however this is only one of the records and I need all of them.
Thank you in advance
Stustirling
source share