Posts RSS Comments RSS Del.icio.us Digg Technorati Blinklist Furl reddit 125 Posts and 30 Comments till now
This wordpress theme is downloaded from wordpress themes website.

Pipe to clipboard (clip / xclip / pbcopy)

On Windows, try: echo hello | clip

On Linux, try: echo hello | xclip

On Mac OS X, try: echo hello | pbcopy

For example, you might do (cat myFile.txt | xclip).  This would basically allow you to edit the clipboard directly.

One Response to “Pipe to clipboard (clip / xclip / pbcopy)”

  1. on 16 Apr 2010 at 22:35 (10:35 pm)BenRose3d

    I looked into this for myself earlier today. Below is something helpful to those wanting to insert and retrieve information from the clipboard in a linux distribution. Below that is something that could prove helpful for those with windows.

    ## Linux ##
    > By default, xclip uses the “primary” clipboard, which is what you have copied with your mouse. To get it to use the manual copy clipboard, use xclip -sel clip
    instead.

    comment #3 here:
    http://ubuntuforums.org/showthread.php?t=413786

    ## Windows ##
    The functionality is available in Active Perl distribution also, which is what I wound up using on the windows box in this exercise; The windows clip.exe didn’t appear to allow for reading the data from the clipboard (only writing into clipboard).
    http://www.xav.com/perl/site/lib/Win32/Clipboard.html

Trackback this post | Feed on Comments to this post

Leave a Reply