My question is very similar to this question however I believe im not entirely sure how to do the following:
In a linux terminal I have a program located in /a
called run
. Normally I would run this program being inside /a
and calling ./run input.case1
which will then read the contents of the file input.case1
and save another file output.case1
to the directory /a
. To make matters worse, there are other files that the program reads when called, but that aren't explicitly passed in the way input.case1
was. For instance the program will make use of insettings.case1
and outsettings.case1
which it assumes are in the directory from which we call the program, i.e. /a
. This all works fine assuming I always work within directory.
However this is not ideal for me because I want to create input files using preprocessing scripts and process the resulting output files using postprocessing scripts that are all located in a separate directory, lets call it /b
. Is there a way to call run
from /b
with all the files that would normally have to be inside /a
located in /b
and having the output file saved to /b
as well?