Commands:
pbcopy
- Copy to clipboardpbpaste
- Paste from clipboard
Example: Pipe filenames to clipboard
$ ls -1 | pbcopy
These commands are useful if copied text should be 100% the same as the output. Selecting and copying text in terminal always has more whitespace than needed or one or two characters are missing. So this is a perfect solution to avoid those.