Skip to content

Instantly share code, notes, and snippets.

@lantw44
Created August 14, 2022 17:12
Show Gist options
  • Save lantw44/9c2681d8fbf4f14a07e3d187b83dba67 to your computer and use it in GitHub Desktop.
Save lantw44/9c2681d8fbf4f14a07e3d187b83dba67 to your computer and use it in GitHub Desktop.
cat */*.json | jq -sr 'flatten | map(.files | select(. != null)) | flatten | map(select(.url_private_download != null) | .url_private_download + "\n" + .id + "-" + .title) | join("\n")' | while IFS= read -r url; do IFS= read -r name; wget -O "../files/$name" "$url"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment