Skip to content

Instantly share code, notes, and snippets.

@egonw
Created February 15, 2021 22:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save egonw/6f5f865a9692bbaa7ab6f83fe7c83600 to your computer and use it in GitHub Desktop.
Script to download all release BridgeDb Derby databases
!/bin/bash
wget -nc https://bridgedb.github.io/data/gene.json
wget -nc https://bridgedb.github.io/data/corona.json
wget -nc https://bridgedb.github.io/data/other.json
jq -r '.mappingFiles | .[] | "\(.file)=\(.downloadURL)"' gene.json > files.txt
jq -r '.mappingFiles | .[] | "\(.file)=\(.downloadURL)"' corona.json >> files.txt
jq -r '.mappingFiles | .[] | "\(.file)=\(.downloadURL)"' other.json >> files.txt
for FILE in $(cat files.txt)
do
readarray -d = -t splitFILE<<< "$FILE"
echo ${splitFILE[0]}
wget -nc -O ${splitFILE[0]} ${splitFILE[1]}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment