Skip to content

Instantly share code, notes, and snippets.

@jogerj
Created July 19, 2022 16:44
Show Gist options
  • Save jogerj/fc827e75d0c5d39b35801d56b74e4cfa to your computer and use it in GitHub Desktop.
Save jogerj/fc827e75d0c5d39b35801d56b74e4cfa to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
curl -s -S -f -o filename.json "$URL"
# -s keeps curl quiet by hiding progress meter and error messages
# -S shows an error message if it fails (stderr)
# -f Fail silently (no output at all) on server errors, keeping stdout clean
# -o specifies an output file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment