Linux creates multiple files with the same name
I need to create 8 txt files named text[x], where X is a number from 1 to 8.
Is there a simple structure to do this? I want to use iterations.
Simple methods such as:
touch text1.txt text2.txt text3.txt text4.txt text5.txt text6.txt text7.txt text8.txt
Yes Not Acceptable.
You can do this without a loop by using
brace expansion in the filename:
Brace Extensions in the bash man page. Unlike wildcard extensions, curly brace extensions do not require a file name.