Writing Text from Clipboard to a Text File

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

Writing Text from Clipboard to a Text File

#1 Post by RSH »

Hi.

If i have selected some text and/or a web address etc.pp. i can copy the text (using strg-c) and paste it into a text file opened in a text editor (using strg-v). I want to write such copied text into a text file - USING BASH.

How could this be done? Is it possible?

RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#2 Post by seaside »

RSH,

In puppies you can use-

Code: Select all

 xclip -o >/path/to/your.txt
to copy text on clipboard

Cheers,
s

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#3 Post by Flash »

I've had pretty good luck highlighting (selecting) the text I want to copy (that's all - just select it, no need to "copy"), then, in the window where I want to paste the text, either simultaneously left and right clicking, or, if the mouse has a scroll wheel, clicking the scroll wheel.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#4 Post by RSH »

Thanks, seaside.

I did never hear of xclip, works fine.

This will add a new feature to my 1st-Anniversary-Application - which is the new LazY FReD downloader.

It's now exactly one year ago, as i did join the forum

The LazY FReD (then 1.0.1) will be my 1st-Anniversary-Gift to the members of this forum.

RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#5 Post by RSH »

Flash wrote:I've had pretty good luck highlighting (selecting) the text I want to copy (that's all - just select it, no need to "copy"), then, in the window where I want to paste the text, either simultaneously left and right clicking, or, if the mouse has a scroll wheel, clicking the scroll wheel.
Not, what i was asking for, but a very very useful tip. Tested and works - from geany to nicoedit and from nicoedit to geany.

Thanks! :D

EDIT:

Works also in a single text editor window. 8)
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

Post Reply