0

I am trying to create a program that will create a new text file for each iteration of a number ie passing in a parameter 3 and setting num=3 should create text.txt and the end result should have text3.txt, text2.txt, and text1.txt. I know that I need to use the touch command to create a new file, but I am unable to figure out how to change that specific variable when I create it.

3
  • Similar questions have been answered countless times here on SO. For example: stackoverflow.com/questions/13638670/… Commented Oct 31, 2017 at 23:44
  • Note that you don't want the accepted answer on the dupe (which is only good with constant values) but the runner-up. Commented Oct 31, 2017 at 23:47
  • Thank you so much! Commented Oct 31, 2017 at 23:53

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.