How can I copy a lot of files in the same directory replacing the year in its name?I have this (can be different filename and extensions):filename1-2014.extfilename2-2014.extfilename3-2014.ext...filenamen-2014.extAnd I want this:filename1-2014.extfilename1-2015.extfilename2-2014.extfilename2-2015.extfilename3-2014.extfilename3-2015.ext...filenamen-2014.extfilenamen-2015.extI can make a script to do it, but I'm wondering is there is an easy way of doing it?
Copy files in same folder and replace year in its name
bash;cp
With find:find . -type f -name '*2014*' -exec bash -c 'cp $0 ${0/2014/2015}' {} \;In the shell loop:for file in *2014*; do    cp $file ${file/2014/2015}done