Skip to content

Instantly share code, notes, and snippets.

@basiclines
Created September 1, 2016 10:17
Show Gist options
  • Save basiclines/0f5eaa3774f81ec5981b20eada34b0f0 to your computer and use it in GitHub Desktop.
Save basiclines/0f5eaa3774f81ec5981b20eada34b0f0 to your computer and use it in GitHub Desktop.
Performs a git move command in a batch of files by renaming file extension
#!/bin/bash
for file in source/*.html.twig; do
git mv "$file" "`basename "$file" .html.twig`.tpl.html"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment