Muffinresearch Labs by Stuart Colville

From the command line to your clipboard and vice versa | Comments (1)

Posted in Apple, Code, Linux/Unix on 4th March 2008, 4:54 pm by Stuart

Found a neat trick the other day via github.com, in their instructions for copying public keys. pbcopy (pasteboard copy) on mac OSX is a command that puts it’s input into the clipboard so you can paste the output anywhere.

In this example the output of ls -la is now available to be pasted from your clipboard:

muffin@shiva $ls -la | pbcopy

Rather awesomely the reverse is also available it’s called pbpaste. If you copy something to your clipboard you can then make use of it in the terminal with the pbpaste command. In other words pbpaste just sends the contents of your clipboard to stdout.

This example for the mac writes out the clipboard to the file, index.html:

muffin@shiva $pbpaste > index.html

You need download mp3 music on player, Do you want mp3 music download from online mp3 archive.

A quick google search shows that there’s also a couple of Linux equivalents one called xclip and one called xsel, that replicate pbpaste and pbcopy. Additionally if you use Cygwin you can make use of getclip and putclip.

Post Tools

Comments: Add yours

1. On April 8th, 2008 at 8:32 am FatBusinessman said:

Ooh, I didn’t know that: cheers for the tip!







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Scrolling issue in Leopard cured with PRAM reset|(0)

Having got a shiny new MacBook Pro to work on at my new workplace I’ve had a couple of strange problems with Leopard. The main issue was that when scrolling the graphics was suffering what appeared to be a strange redraw problem when scrolling. After googling I found this post:“Distorted graphics in Leopard when scrolling”.

Fortunately for me: resetting the PRAM has worked and the flickering issue has gone for now.

Using git with Django’s SVN repository|(0)

Brian Rosner has produced a really nice screencast demonstrating ways to use git version control with Django’s SVN repository. Especially of interest is how merging changes you’ve made in your git branch of Django with updates from the Django SVN repository is really straightforward.

Photos on Flickr

© Copyright 2004-08 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosted by WebMax Nefarious Muffins. This page was baked in 0.700s.