The current version will be found at https://gist.github.com/mike-bourgeous/bd58056617e1922ecba72abc58de94fc
Please make all comments, stars, forks, etc. there.
The current version will be found at https://gist.github.com/mike-bourgeous/bd58056617e1922ecba72abc58de94fc
Please make all comments, stars, forks, etc. there.
| #!/bin/bash | |
| test() { | |
| echo "Standard out" | |
| echo "Standard error" >&2 | |
| } | |
| tmpfile=`mktemp` | |
| test 3>&1 4>&2 2>&3- 1>&4- | tee $tmpfile | |
| cat $tmpfile | |
| rm $tmpfile | |
| # Result: | |
| # Standard out | |
| # Standard error | |
| # Standard error |