A
A
artloveyou2021-12-08 15:51:15
linux
artloveyou, 2021-12-08 15:51:15

How to bulk create copies of files with suffixes?

There are files:
file1.test
file2.test
file3.test It is

necessary to copy them 50 times to the same directory naming according to the principle:
file1_1.test
file2_1.test
file3_1.test
file1_2.test
file2_2.test
file3_2.test
etc.

Is there a way to automate this in the Linux console?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xotkot, 2021-12-08
@artloveyou

for i in {1..50}; do cp file1.test file1_$i.test;done

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question