Log in
Dec
30

This is a simple little trick that i’m not sure where i first read about.

If you’re in the terminal and need to copy something to the clipboard (say the output of a command) you can pipe it to the pbcopy command. Likewise the pbpaste command will spit out the last thing copied. Likely not the most useful thing you’ll find all day, but still interesting to know.

One small caveat however is that the pbcopy command will copy newlines at the end of your output so often the copied text isn’t as immediately useful for re-inserting into another command as one would hope.

Welcome to the blogsphere again dude!

Leave a comment
*
* (will not be shown)