Mass replace and copy by file extension
I just cloned a Rails project.
There are a bunch of files with the
.yml.sample extension under the config directory.
I'd like to copy all those files without the
zsh functions to the rescue!
Add this to your
autoload -U zmv
zmv -C 'config/(*.yml).sample' 'config/$1'
By default, zmv will move files.
-C puts it in copy mode.
For more info: