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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .