'The "> (tee -a ...)" command in Bash

I have this Bash code that runs Scala test code:

scripts=(
Hello.scala
)

for script in "${scripts[@]}"; do
    echo scala "${script}"
    scala -nocompdaemon "${script}" > >(tee -a _testoutput.txt) \
        2> >(tee -a _testerrors.txt >&2)
done

How can I interpret >(tee -a _testoutput.txt)? I normally use | (pipe) for using tee. What's the difference when using this expression?



Solution 1:[1]

>( list ) is called "process substitution". It's more powerful than a normal pipe: You can't use | to redirect standard output and standard error to different programs so easily.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1