yank

Copy terminal output to clipboard without leaving the shell

brewmacoslinux
Try with needOr install directly
Source

About

Copy terminal output to clipboard

Commands

yank

Examples

Copy command output directly to clipboard$ ls -la | yank
Yank and paste a file's contents to clipboard$ cat myfile.txt | yank
Copy git log output to clipboard$ git log --oneline | yank