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.ext
filename2-2014.ext
filename3-2014.ext
...
filenamen-2014.ext
And I want this:
filename1-2014.ext
filename1-2015.ext
filename2-2014.ext
filename2-2015.ext
filename3-2014.ext
filename3-2015.ext
...
filenamen-2014.ext
filenamen-2015.ext
I can make a script to do it, but I'm wondering is there is an easy way of doing it?
Best Answer
With find:
In the shell loop: