Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
call this script from terminal an pass to it the file with the URLs you want to download. One URL per line
#!/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