I want to split stdout so that it is printed both to stdout and stderr. This sounds like a job for tee but the syntax is evading me –
./script.sh | tee stderr
Of course, how should stderr actually be referred to here?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Note that this is dependant on OS support, not any built-in power in tee, so isn’t universal (but will work on MacOS, Linux, Solaris, FreeBSD, probably others).