I have a directory with thousands of files, and I want to run a software multiple times in different directories with the same input files without copy the input in each directory, I have created a symbolic link to each file with the next code
ln -s /path/to/bayestraits/*_b.txt /path/to/bayestraits/dependiente_1
the directory structure is as follow
bayestraits
dependiente_1
dependiente_2
dependiente_3
and I want to run the next code in each directory
for file in *_b.txt; do BayesTraitsV3 cyanomarkers_2.nex $file < Discrete_Dependent.txt ; done
the trouble is that when I run the code, the output file is redirected to bayestraits directory no to dependiente_1 directory
dependiente_?
directories when you run your loop, or are you located in thebayestraits
directory? Can you explicitly tell your program where to create its output files with an option?