I know that piping to
pbcopy copies command line outputs to the clipboard.
How can I still show the output in the terminal ?
The tool of choice is called
tee. Full description is available via
man tee but you canprobably just use
echo test | tee >(pbcopy)
to get the result you are looking for.
You could just pbpaste immediately after.
echo test | pbcopy | pbpaste