I am trying to use a nested loop so that I can get the urls I desire, while also renaming the downloaded files to be unique. I am not getting something right.
The outcome is that I have unique file names (exactly like I want), but then they all have the same content, not at all what I want.
Here is what I have:
for image_name in `cat $IMAGE_TEST`;
do
for manifest_url in `cat $MANIFEST_URL_LIST`;
do
curl -H "Authorization: Bearer $KC_ACCESS_TOKEN" $manifest_url > \
manifests/$image_name.json
done
done
I have also tried:
for image_name in `cat $IMAGE_TEST`;
do
while read -r manifest_url
do
curl -H "Authorization: Bearer $KC_ACCESS_TOKEN" $manifest_url > \
mainifests/$image_name.json
done < $MANIFEST_URL_LIST
done
and other combinations of this, but seem to be not seeing what I am missing. Please help!