Quite new to bash - I'm trying to store the output of my /usr/bin/time command into the TIME_INFO variable, which works with the below setup... however I would also like to be able to store the output of some of the other nested commands (such as /usr/local/bin/firejail or ./program) to other variables. Currently if there is a runtime exception in ./program it'll also go to the TIME_INFO variable.
TIME_INFO=$( /usr/bin/time --quiet -f "%e-%U-%S-%M-%x" 2>&1 \
timeout 5s \
/usr/local/bin/firejail --quiet --cgroup=/sys/fs/cgroup/memory/group1/tasks --profile=java.profile \
./program < test.in > test.out )
Is there any way to accomplish separating outputs of multiple nested commands?
Thanks in advance!