Created
November 9, 2015 04:54
-
-
Save claytantor/b10cb69492204dd0c2e1 to your computer and use it in GitHub Desktop.
How to list aws dir as CSV
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
aws s3 ls s3://dronze.2b67/data/wiki --region=us-west-2 --recursive | python -c ' | |
import sys | |
for line in sys.stdin: | |
r = line.strip("\n").split(None, 10) | |
fn = r.pop() | |
print ",".join(r) + "," + fn.replace("\"", "\"\"") | |
'>wiki_docs.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment