Created
April 15, 2015 15:22
-
-
Save ssendeavour/04a2e611f02950f882cf to your computer and use it in GitHub Desktop.
How do I write stderr to a file while using “tee” with a pipe?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# stackoverflow.com/questions/692000/how-do-i-write-stderr-to-a-file-while-using-tee-with-a-pipe | |
command_to_execute 2>&1 | tee -a log | |
# in bash 4 | |
command_to_execute |& tee -a log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment