pbcopy ftw
pbcopy
is a great tool on Apple systems that accepts standard input and puts on on the clipboard, so it can be pasted into another program.
For example,
Now the echo
‘ed text will be on the clipboard.
Here’s a bash function for generating a new password and having it wind up on the clipboard:
This can be done on Linux with a similar tool such as xclip
.