bash - Can the shell direct where a program places its output files? -


can shell override output files placed? (not console/screen output, files created program.) have script runs sequence of input files through program , each 1 produces lot of different output files.

for in `seq 1 24`  ../bin/myprog inputfile.$i.in done 

is there way create new directories each run of program , place corresponding output files in each directory? dir1: <output files run 1>; dir2 <output files run 2> etc. suppose 1 way write script create directories , sort files after program(s) had run, there more elegant way it?

as suggested in comments, might need, assuming program dumps output current working directory.

for in `seq 1 24`    mkdir $i   pushd $i   ../../bin/myprog ../inputfile.$i.in   popd done 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -