Created
December 7, 2010 11:27
-
-
Save l0b0/731695 to your computer and use it in GitHub Desktop.
Output to *both* stdout and stderr
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
command | tee /dev/fd/2 | |
# Can be used to debug variable computations - Just plonk the tee at the end: | |
# $ uid=$(id -u | tee /dev/fd/2) | |
# 1234 | |
# $ echo $uid | |
# 1234 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment