I have a quick question. I just wanted to know if it was valid format (using bash shell scripting) to have a counter for a loop in a file name. I am thinking something along the lines of:
for((i=1; i <=12; i++))
do
STUFF
make a file(i).txt
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you only want to make a bunch of files and don’t need the loop for anything else, you can skip the loop altogether:
will make them all in one command.
If you have Bash 4, you can get leading zeros like this: