This tutorial was made thinking in you that’s using the Z Shell on Mac.
To check the shell that your using you can use the following command:
echo $SHELL
If the output was:
/bin/zsh
Then it means that your using the Z Shell.
Let’s say you have some data in a file named test.txt, you can then use the following command to get the output from this file and pass it to the clipboard by using pbcopy on Mac.
pbcopy < test.txt
Now that data was successfully copied to the clipboard on your Mac computer!
Of course there are other ways to use the pbcopy, but the main goal of this article was to give you a quick answer, so that you can have your data in your clipboard right off the bat.
I hope really it help, and thanks a lot for stopping by!