Last active
January 19, 2024 12:07
-
-
Save lucasassisrosa/6c5d1246b3514e7b3003d08a830cccc5 to your computer and use it in GitHub Desktop.
Rename folder all files extensions
This file contains hidden or 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
# transform all files to .md, including nested. Use -n to preview changes | |
rename -p -e 's/(\/.*)\.php/$1\.md/' **/*.php | |
rename -p -e 's/(\/.*)\.py/$1\.md/' **/*.py | |
rename -p -e 's/(\/.*)\.rb/$1\.md/' **/*.rb | |
rename -p -e 's/(\/.*)\.java/$1\.md/' **/*.java | |
rename -p -e 's/(\/.*)\.cs/$1\.md/' **/*.cs | |
# It outputs something like "'php/outbound_voice_profiles/outbound_voice_profiles/get.php' would be renamed to 'php/outbound_voice_profiles/outbound_voice_profiles/get.md'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment