Extend your shell toolbox with pbcopy

I’m developing Rails applications on Mac and a command which isn’t used enough in my opinion is “pbcopy”. This command will allow you to grab the standard input from a terminal and put it on the clipboard.

I find myself using commands such as “pwd | pbcopy” a lot. This will grab my current working directory and make it available in my clipboard allowing me to easily paste it into another terminal or application. This avoids the need for you to grab your mouse to paste a simple line.

Just a quick tip for developers switching between terminal and desktop applications on a regular basis.