Mac OS X – Pipe contents into the clipboard

Windows

On windows I used to the time when I wanted some output (from a file or command) in the clipboard.

> tracert www.dn.se | clip

or

> type data.txt | clip

And then I went of and pasted it somewhere.

Mac

Haven’t been using it on mac but today I needed it. So after googling around I found pbcopy.

> cat redis-trottle.js | pbcopy

And Bob’s your uncle!

Kommentera

E-postadressen publiceras inte. Obligatoriska fält är märkta *