Skip to content

Instantly share code, notes, and snippets.

@beckyconning
Created November 8, 2019 21:04
Show Gist options
  • Save beckyconning/7bc444eb2dcfb4bbaa8d66f474fe4444 to your computer and use it in GitHub Desktop.
Save beckyconning/7bc444eb2dcfb4bbaa8d66f474fe4444 to your computer and use it in GitHub Desktop.
next=$({ curl -v 'https://api.fda.gov/animalandveterinary/event.json?limit=100&api_key=PGLbKWdpoZh6XOTE8kGSuL2Ket5ClAFziohrdPQx' 2>&1 1>>example | perl -0777 -ne 'print "$&\n" if /(?:(?!<).)*?(?=>; rel="next")/'; }) && while [ "$next" != "" ]; do next=$({ curl -v "$next" 2>&1 1>>example | perl -0777 -ne 'print "$&\n" if /(?:(?!<).)*?(?=>; rel="next")/'; }); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment