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:
stdout
redirected tomy_app.log
- see
stderr
live in my terminal
When I manually execute the script, I want all of the following:
stdout
redirected tomy_app.log
stderr
redirected tomy_app.err
- see
stdout
live in my terminal - see
stderr
live 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.