Using awscli in git bash, the command
aws s3 ls "s3://directory/"
returns a list of
PRE "filename"
This is inconvenient as I need to do further commands on the output and I only need the file/directory names within the given directory.
For instance, it would be nice to be able to do:
for dir in $(aws s3 ls s3://directory/) do
aws s3 ls $dir | grep .json;
done
Any suggestions to work around this?