0

The answer(s) to this question explains how to print stdout and stderr to the terminal, while also redirecting them to a file:

program [arguments...] 2>&1 | tee outfile

How could this be extended if stdout and stderr should be redirected in 2 different files ?

John Kugelman
  • 330,190
  • 66
  • 504
  • 555
Vince
  • 3,565
  • 8
  • 32
  • 61

1 Answers1

1

With process substitution:

program >(tee stdout.log) 2>(tee stderr.log >&2)
John Kugelman
  • 330,190
  • 66
  • 504
  • 555