Last active
January 23, 2019 11:26
-
-
Save stefanofiorentino/91ac92bd571d8d380fcd452922480ffd to your computer and use it in GitHub Desktop.
rename all cpp files to hpp extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find . -name "*.cpp" | grep "cpp$" | sed 's/cpp$//g' | xargs -r -n1 -I {} echo mv {}cpp {}hpp | |
find . -name "*.hpp" | xargs -r -n1 -I {} sed -i '1s;^;#pragma once\n;' {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment