Hello, I am new to programming and Physics grad student(be easy on me ;-)).
I have a program which saves data to an outfile in the folder sigma0.lambda0
i.e. /home/user/Foo/sigma0.lambda0/
However, I want to change the parameters sigma and lambda which I obtained by reading in a parameter file.
Sigma and Lambda are ints, so they can be simply changed with a for loop.
However, after changing these parameters and running the program again, I want to save the file into another folder
/home/user/Foo/sigma1.lambda0/ etc....
I have tried manually going into the char OUTFILE[101] and looping with a pointer until I find the the character of interest in OUTFILE and changing this manually. But it is cumbersome and I feel like someone will have a better solution.
Edit: I already have the outfile directories made using a simple bash script.
Thanks.