using tee to output intermediate results to stdout instead of files
sometimes /dev/tty can be used for that...
ls /bin /usr/bin | sort | uniq | tee /dev/tty | grep out | wc
ls /bin /usr/bin | sort | uniq | tee /dev/fd/2 | grep out | wc
On a linux system you can use the the /dev/fd/[num]
links like named pipes in many cases. This will duplicate stdout to stderr, which, typically, is your terminal screen, but doesn't need to be.
This command worked for me.
ls /bin /usr/bin | sort | uniq | tee /dev/pts/0 | grep out
You could check what is your terminal using the command tty
and replace the tee to redirect the output to that terminal.
References
https://stackoverflow.com/a/18025293/1742825