views:

12

answers:

0

Disclaimer: Not a programmer by trade, but I've messed around a little in the past.

Problem: I have a CLI program that generates an output text file from a text file list of inputs. I have been manually changing inputs in the text file to view the changes in output; however, this is inefficient. I would like to define a range of inputs for multiple variables in order to be fed into the program.

For example, given a text file of:

name=name text
more text
some more text
varA=X
more text
varB=Y
more text
varC=Z more text even more text

and ranges of X=1-10, Y=1-3, Z=0=1,

I "think" I want a way to create 60 text files named nameXXYZ.txt, with ascending values of X, Y, and Z and name=nameXXYZ, that I can then feed into the program (if defined, the program will accept multiple inputs and concatenate results). I can then parse the output. Thoughts on the easiest way to do this? I know I need some kind of nested for loop, but I'm not quite sure how to get started, and my programming experience is ancient.