how to realize what you can do in the command prompt:
ls > file1 > file2
This command line does not redirect stream to multiple files. Output falls only in one of them. The second file is created but remains empty.
Redirect output to multiple files using the command tee:
ls | tee file1 file2
The only thing I can think of...manually recorded in each fd.