Skip to content

Instantly share code, notes, and snippets.

@nedix
Last active September 7, 2023 19:09
Show Gist options
  • Save nedix/1837e5f99989fe0fa76228e89b1a272a to your computer and use it in GitHub Desktop.
Save nedix/1837e5f99989fe0fa76228e89b1a272a to your computer and use it in GitHub Desktop.
Kubernetes neat on all files in the current directory
#!/usr/bin/env bash
find . -type f -print0 | xargs -0 -I {} sh -c 'OUTPUT=$(kubectl neat -f {}); echo "$OUTPUT" > {}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment