Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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,

Code Block
languagebash
command > >(tee stdout.log) 2> >(tee stderr.log >&2)