Skip to content

Instantly share code, notes, and snippets.

@highercomve
Last active July 21, 2016 17:26
Show Gist options
  • Save highercomve/7406446 to your computer and use it in GitHub Desktop.
Save highercomve/7406446 to your computer and use it in GitHub Desktop.
Command on shell to use https://github.com/erniebrodeur/ruby-beautify recursive in a folder
find . -name '*.js' -exec sh -c 'js-beautify {} > _tmp_ && mv _tmp_ {}' \;
find . -name '*.rb' -exec sh -c 'rbeautify {} > _tmp_ && mv _tmp_ {}' \;
find . -name '*.js' ! -type d -exec bash -c 'expand -t 2 "$0" > /tmp/e && mv /tmp/e "$0"' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment