Skip to content

Instantly share code, notes, and snippets.

@ddossot
Forked from nstielau/lint_json.sh
Created February 27, 2014 16:19
Show Gist options
  • Save ddossot/9253370 to your computer and use it in GitHub Desktop.
Save ddossot/9253370 to your computer and use it in GitHub Desktop.
# Lint JSON with jq (the exit 255 stops xargs after the first failed command)
find . -name "*.json" -print | xargs -Ixx bash -c "echo JSON linting xx 1>&2; cat xx | jq '.' > /dev/null || exit 255"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment