My sysadmin created a bash script and the first command in it is to redirect the output in a log file:
exec > my_app.log
With this, I have the following:
stdoutredirected tomy_app.log- see
stderrlive in my terminal
When I manually execute the script, I want all of the following:
stdoutredirected tomy_app.logstderrredirected tomy_app.err- see
stdoutlive in my terminal - see
stderrlive in my terminal
What do I need to change to the exec to have all that to happen?
Currently what I do is open 3 terminals.
- one to run the script with
./my_script.sh 2> my_app.err - one to use
tail -f my_app.log - one to use
tail -f my_app.err
This is too much I think.
man tee