I'd like to copy and rename multiple files within the same folder. Just like I have the files foo.c foo.h and want to use them as a template for new files named bar.c bar.h.
cp foo.* bar.*
would describe what I mean but won't work.
using rename will just overwrite the old files.
Is there some simple solution for this or do I have to create a whole script that opens a folder in /tmp, copy there, rename there and move back?