Read filenames from stdin, and take backups before writing output back to the original filepaths

uncrustify

  • C, C++, C#, D, Java and Pawn source code formatter.
    More information: <https://github.com/uncrustify/uncrustify>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

find . -name "*.cpp" | uncrustify -F - --replace

click the source code to copy install uncrustify on any operating system with command-not-found.com