Redirect standard and error output from a command to a file and show it in the terminal

https://www.cyberciti.biz/faq/redirecting-stderr-to-stdout/

$CMD 2>&1 | tee $FILENAME
Copied!

Use your own input

If you have values you'd like to use instead of the provided variables, type or paste your data into the variable inputs below. If Javascript is enabled, your text will automatically be added to the command and you can click to copy.