Last active
October 12, 2022 03:37
-
-
Save smhr/5e90292248d0cf6b0d8ec2963b0e7724 to your computer and use it in GitHub Desktop.
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
sha256sum -c checksums.txt &> check.log & | |
## then to find bad files: | |
cat check.log | grep FA | awk -F. '{print $2}' > FAILED_CHECKSUM | |
# inpot: snap_099.92.hdf5: FAILED | |
# output: 92 | |
# then run (for TNG100-1) | |
while read snapN | |
do | |
echo " ============= Downloading : ${snapN} " | |
wget --no-check-certificate --content-disposition --header="API-Key: your_key" "http://www.tng-project.org/api/TNG100-1/files/snapshot-99.${snapN}.hdf5" | |
done < FAILED_CHECKSUM |
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
echo "Calculating checksums ..." | |
sha256sum -c checksums.txt &> check.log | |
## then to find bad files: | |
cat check.log | grep FA | awk -F. '{print $2}' > FAILED_CHECKSUM | |
echo "$(wc -l FAILED_CHECKSUM) found" | |
while read Name | |
do | |
echo " ============= Downloading : ${Name} " | |
wget --no-check-certificate --content-disposition --header="API-Key: your_key" "http://www.tng-project.org/api/TNG50-1/files/groupcat-50.${Name}.hdf5" | |
done < FAILED_CHECKSUM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment