Skip to content

Instantly share code, notes, and snippets.

@adamamyl
Created July 6, 2023 13:34
Show Gist options
  • Save adamamyl/0fdc07c169b6434a3d0560c17f420cb0 to your computer and use it in GitHub Desktop.
Save adamamyl/0fdc07c169b6434a3d0560c17f420cb0 to your computer and use it in GitHub Desktop.
One-liner to recursively convert json to csv
# `brew install dasel` if needed…
find . -name "*.json" -type f -exec bash -c 'dasel -r json -w csv < "$0" > "${0%json}csv"' {} \;
# and to purge the jsons…
#find . -name "*.json" -type f -delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment