FILES=../path/*
for FILE in $FILES;
do
./processInput.py -f <(./processInput.py -f $FILE) > $FILE
done
Above is the gist of my code. I am redirecting system output from one process into a temporary file which is used as input to the same script but in a different process. When I redirect that output to some random file, things work out fine and the file contains the correct output. However, when I try to redirect back to $FILE, it errors out as if the outer process has an issue. Is there some order of operations that's messing things up here?
I could output to some random file and then remove the file when i'm done with it, but i'd like to avoid that unnecessary step if possible.