I am asking in the context of piping the result of the following command to another:
echo "foo" | tee >&2
I am asking in the context of piping the result of the following command to another:
echo "foo" | tee >&2
with >&2
you are sending the output to standard error instead of standard out.
here you can read about the standard I/O streams: