[Haifux] cat-like command

Shlomi Fish shlomif at iglu.org.il
Sun Dec 20 12:31:08 MSK 2009


On Sunday 20 Dec 2009 09:07:47 Yotam Medini יותם מדיני wrote:
> xclip - command line interface to X selections
> -- yotam
> 

Yes, I know of it. I should note that I was told that it doesn't work on KDE, 
and when I'm running KDE, I'm using the following script:

<<<<<<<<<<<<<<<<<<<
#!/bin/bash

# Copy standard input or a string to the KDE clipboard.
if [[ $# -eq 0 ]]; then
    input="$(cat)"
else
    input="$*"
fi

if which klipper | grep -q kde3 ; then
    dcop klipper klipper setClipboardContents "$input"
else
    dbus-send --type=method_call --dest=org.kde.klipper \
        /klipper org.kde.klipper.klipper.setClipboardContents \
        string:"$input"
fi
>>>>>>>>>>>>>>>>>>>

I call it "klip".

Regards,

	Shlomi Fish

> On Sun, Dec 20, 2009 at 6:00 AM, Brian Wood <woodbrian77 at gmail.com> wrote:
> > Is there a command something like cat that will copy a
> > file into the copy/paste buffer, so I can paste the contents
> > somewhere after running the command?
> >
> > Also I'd like to find someone willing to give me an account
> > on a big-endian machine.  I'm willing to give that person
> > investments in Ebenezer Enterprises in exchange.
> >
> > TIA.
> >
> > --
> > Brian Wood
> 

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
First stop for Perl beginners - http://perl-begin.org/

Bzr is slower than Subversion in combination with Sourceforge. 
( By: http://dazjorz.com/ )



More information about the Haifux mailing list