Skip to content

Instantly share code, notes, and snippets.

@thedoc31
Created September 8, 2017 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thedoc31/2a1852d56a36a44efd20d51a0db67351 to your computer and use it in GitHub Desktop.
Save thedoc31/2a1852d56a36a44efd20d51a0db67351 to your computer and use it in GitHub Desktop.
One-liner to find bulk modified chef environment files and upload them all to chef
git status | grep modified | grep json | sed 's/\(.*modified:\s*\)//' | while IFS='' read filename; do knife environment from file $(echo $filename); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment