Page tree
Skip to end of metadata
Go to start of metadata

Instead of using fancy redirection commands for output use tee which reads from standard input and writes to standard output and files.

If you want to be very thorough and have tee also handle strderr (standard error) and ensure it stays on screen,

I have yet to personally try this.



command > >(tee stdout.log) 2> >(tee stderr.log >&2)

References

How do I write stderr to a file while using “tee” with a pipe? - http://stackoverflow.com/questions/692000/how-do-i-write-stderr-to-a-file-while-using-tee-with-a-pipe

  • No labels