Asked • 05/05/19

How do I write stderr to a file while using "tee" with a pipe?

I know how to use `tee` to write the output (`STDOUT`) of `aaa.sh` to `bbb.out`, while still displaying it in the terminal: ./aaa.sh | tee bbb.out How would I now also write `STDERR` to a file named `ccc.out`, while still having it displayed?

Anthony B.

Which shell are you using? echo $SHELL
Report

05/26/19

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.