Last active
August 12, 2020 04:49
-
-
Save roymacdonald/fc808144d46fc499d654d05209f2495a to your computer and use it in GitHub Desktop.
call this script from terminal an pass to it the file with the URLs you want to download. One URL per line
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 | |
if [ $# -eq 0 ];then | |
echo "Usage:" | |
echo " downloadImgsFromJson.sh /path/to/json/file" | |
exit 1 | |
fi | |
URLS=($(cat "$1" | grep -o "\"original\":.*$" | sed -E "s/\"original\": \"(.*)\"/\1/g" )) | |
for u in "${URLS[@]}"; do | |
curl -O "$u" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment