Skip to main content

Capture stdout and stderr to file with tee

How to capture stdout and stderr with tee command:

command 2>&1 | tee output.txt