Capture stdout and stderr to file with tee 2023-09-08 Command-Line Toolbelt How to capture stdout and stderr with tee command: command 2>&1 | tee output.txt