David Jack Wange Olrik

Tea. Earl Grey. Hot.

Command Line Pasting

Terminal.png While working on a project at $work, I found the need to copy the output from a command into my pasteboard. A little digging around turned up [cc lang=”bash”]pbcopy[/cc] and [cc lang=”bash”]pbpaste[/cc], which is shipped with Leopard per default. So now I do stuff like: [cc lang=”bash”] date | pbcopy cat file.txt | pbcopy [/cc] +tab to program of choice, and +v to paste it. Ain’t it great ?