Passing An Array From One Bash Script to Another
Your way of passing the array is correct
./scriptTwo.sh "${array[@]}"
The problem is probably in the way how you receive it. In scriptTwo.sh
, use
array=("$@")
Your way of passing the array is correct
./scriptTwo.sh "${array[@]}"
The problem is probably in the way how you receive it. In scriptTwo.sh
, use
array=("$@")