Skip to content

Instantly share code, notes, and snippets.

@rg3915
Created July 2, 2023 08:30
Show Gist options
  • Save rg3915/6f47f128bcdc048ebd1101b4b94eb9f6 to your computer and use it in GitHub Desktop.
Save rg3915/6f47f128bcdc048ebd1101b4b94eb9f6 to your computer and use it in GitHub Desktop.
Copy and rename files recursively
find backend/core/templates -type f -name "*_*" -exec bash -c 'mv "$0" "${0//_/-}"' {} \;
find backend/core/templates -type f -name "*_light_*" -exec bash -c 'mv "$0" "${0//_light_/_}"' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment