I'm using swift CLI and trying to download multiple objects from a container.
I can do this as such
for i in `swift list container -p object/201505`; do swift download container $i; done
the problem is I have multiple objects I need to search for and download all that match. I've tried doing it in a small script.
#!/bin/bash
while read objects;
SAMPLE=$(swift list container objects);
do
for i in $SAMPLE; do `swift download container $i`; done
done < samples_list
But I am always greeted with the following.
Usage: swift [options] list [options] [container]
Lists the containers for the account or the objects for a container. -p or
--prefix is an option that will only list items beginning with that prefix.
-d or --delimiter is option (for container listings only) that will roll up
items with the given delimiter (see Cloud Files general documentation for
what this means).
Are my variables not being read? How can I download only the files that have the correct prefix as I set?