Created
October 23, 2017 12:08
-
-
Save softberries/2d675073eeaac4e04884e41acef66487 to your computer and use it in GitHub Desktop.
prep data bash script
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
#!/usr/bin/env bash | |
S3_DESTINATION_FOLDER="grajo001log/users" | |
SITES_FILE=sites.txt | |
IFS=$'\n' | |
for site in `cat $SITES_FILE` | |
do | |
echo "$site" | |
wget https://archive.org/download/stackexchange/$site.7z | |
7z x $site.7z -otemp | |
aws s3 cp temp/Users.xml s3://$S3_DESTINATION_FOLDER/$site.xml | |
rm $site.7z | |
rm -Rf temp | |
done | |
echo 'Finished!' | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment