homepage Welcome to WebmasterWorld Guest from 54.166.113.249
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
How to redirect output to "clipboard" on command line
This should be verry common
benlieb

10+ Year Member



 
Msg#: 1324 posted 6:03 pm on Dec 25, 2004 (gmt 0)

I have looked everywhere to for how to redirect the output of a command to the "clipboard" (don't know what this is called in linux). It should be easy. I recall having read something about a "* register or something somewhere.

I want this:

ls -A1 > "clipboard"

Then I can "paste" this anywhere. I can use the mouse methode, but want the output redirect. I'm using cygwin by the way.

 

jollymcfats

10+ Year Member



 
Msg#: 1324 posted 11:38 pm on Dec 25, 2004 (gmt 0)

getclip and putclip will let you manipulate the Windows clipboard in Cygwin.

quesera

10+ Year Member



 
Msg#: 1324 posted 12:42 am on Dec 26, 2004 (gmt 0)

For those not using Cygwin, there is an X-Windows utility called "xclip" which reads STDIN and puts the input into an X clipboard.

cat filename  xclip

X clipboards are not the same as Gnome or KDE clipboards, however. Someone wrote a bash function for KDE called "klip" that uses the KDE utility "klipper" to do the same thing (search for it).. I didn't find anything similar for Gnome, but some Gnome apps play nicely with X clipboards...so maybe xclip would work?

So it will depend on which application are you pasting into, unfortunately.

jollymcfats

10+ Year Member



 
Msg#: 1324 posted 1:01 am on Dec 26, 2004 (gmt 0)

Most (all?) KDE and Gnome apps interact with the X clipboard totally normally. Just middle click to paste instead of C-v.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved