- Ashik Nesin
If you want to automate things in shell, especially copy-paste things from the terminal then
pbpaste commands might be a good choice for you on MacOS.
With those commands, we can copy paste contents from and to the clipboard easily.
|pbcopy||Copies the output from the previous command to the clipboard|
|pbpaste||Outputs the contents of the clipboard to the standard output (stdout)|
echo "Copy this" | pbcopy # Now your clipboard will have "Copy this" echo $(pbpaste) # "Copy this" is printed on the terminal
Happy copy-pasting texts!