Skip to content
Advertisement

How do I copy files in the same directory with a number changed of filename

I would like to copy mutiple files using patterns for a new file name.

For example:

JavaScript

How do I copy these files into the following filename automatically using bash-script?

JavaScript

Many thanks

Advertisement

Answer

JavaScript

This copies all files in the current directory, replacing 1 with 2. It’s not really useful as it serve a very specific purpose and is not very reusable, but maybe it’s what you need.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement