I want to redirect both stdout and stderr of a process to a single file. How do I do that in Bash?
Take a look here. Should be:
(redirects both stdout and stderr to filename).
do_something 2>&1 | tee -a some_file
This is going to redirect stderr to stdout and stdout to some_file and print it to stdout.