Is there a way to persist file redirection commands between exec calls?
For example, there are two bash scripts. In script 1, I am setting up redirection of stdout and stderr to file. Then exec-ing script2.
script1
exec &> >(tee "$logs_file")
echo "something"
exec "./script2.sh"
script2
echo "something else
Inside log file only the echo commands from script 1 appear but not script 2.
something
Is there a way to persist file redirection commands between exec calls?