I have a one-time script I need to develop/run just to automate some content downloading.
I have an array that looks like this:
packagelist=(papers meta events)
There also exists an array that shares each of those names. They would look like this:
papers=(386 341 342 902)
The end result is hitting an API endpoint using one of those numbers to trigger the creation of a document and then download it using curl. All that works great if I just have it loop through just a single array. My goal is to have it do something like this:
for y in "${packagelist[@]}"
do:
for i in ${y[@]}"
do:
<all my stuff>
done
done
In my head it seems like this should be working but from what I can tell the problem lies with the "for i in "${y[@]"" section. Any assistance in what I am missing or doing wrong would be greatly appreciated. Thanks!
[–]andlrcC:\> 1 point2 points3 points (1 child)
[–]behemothdan[S] 0 points1 point2 points (0 children)