So I am trying to compare output of two python programs, which have files that I will call trace1.py and trace2.py. Currently I am using process substitution with diff to try and compare their outputs, however I'm having trouble with finding both files, since they are in separate sub-directories of my current directory:
diff <(python /subdir1/tracing1.py) <(python /subdir2/tracing2.py)
When I run this, I get
The system cannot find the file specified.
I think I'm messing up some sort of path formatting, or else I'm using the process substitution incorrectly.
EDIT: In the end I decided that I didn't need to use process substitution, and instead could just diff program output after each program is run. However thanks to Fallenreaper in the comments, I was able to find a single command that does what I initially wanted:
python subdir1/tracing1.py > outfile1.txt & python subdir2/tracing2.py > outfile2.txt & diff outfile1.txt outfile2.txt
python /path/tracing1.py &1> outfile1.txt & python /path/tracing2.py &1 >outfile2.txt & diff outfile1.txt outfile2.txtsubdir1andsubdir2are subdirectories of the current directory (and not root-level directories), you probably meansubdir1/tracing1.py(without the leading slash).diff <(echo blah >&2) <(echo blahx), so I don't think that's the problem.