Created
April 21, 2016 15:49
-
-
Save flekschas/8d7aedf5d70208eb5ec7683cf1b7c337 to your computer and use it in GitHub Desktop.
Grab all ISA-Tabs from Nature Scientific Data
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 | |
# Download Nature Scientific Data ISA Tabs | |
YEARS[0]=2014 | |
YEARS[1]=2015 | |
YEARS[2]=2016 | |
NUM_ISA_TABS[0]=53 | |
NUM_ISA_TABS[1]=76 | |
# This number will most likely go up. | |
NUM_ISA_TABS[2]=24 | |
for i in "${!YEARS[@]}"; | |
do | |
echo "Year ${YEARS[$i]}" | |
for j in `seq 1 ${NUM_ISA_TABS[$i]}`; | |
do | |
[ -f ./sdata${YEARS[$i]}$j-isa1.zip ] || curl -L -O http://www.nature.com/article-assets/npg/sdata/${YEARS[$i]}/sdata${YEARS[$i]}$j/isa-tab/sdata${YEARS[$i]}$j-isa1.zip | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment