I saw this at the top of my bash script file:

 export LOGFILE=$LOGDIRECTORY/${SCRIPT_NAME}.log
 exec > >(tee $LOGFILE)
 exec 2>&1

What does it do? What are two exec processes doing here? I realize that keeping it like this, all the output of the execution of the script is piped to `$LOGFILE` but I wanted to understand from the perspective of the `exec` statements.