LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-06-2006, 12:43 PM   #1
royeo
Member
 
Registered: Jun 2006
Posts: 150

Rep: Reputation: 15
How would I transfer the output of a command or a program to here, eliminating typin


How would I transfer the output of a command or program or whatever to here, so I don't have to type it? Some output is not copiable (I know this isn't a word)to the clipboard.

Thanks,

royeo
 
Old 07-06-2006, 12:47 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 59
use the redirection symbol (>) to save the output to a file, ie: ls > lsOutputFile.txt
use the pipe symbol (|) to make the output of one command the input of another, ie: dmesg | less
 
Old 07-06-2006, 12:54 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally Posted by royeo
How would I transfer the output of a command or program or whatever to here, so I don't have to type it? Some output is not copiable (I know this isn't a word)to the clipboard.

Thanks,

royeo
Have you tried the highlight and middle-click method? It avoids
application (or DE) clipboards and uses X primitives.


Cheers,
Tink
 
Old 07-07-2006, 06:51 PM   #4
royeo
Member
 
Registered: Jun 2006
Posts: 150

Original Poster
Rep: Reputation: 15
Output to here

I don't have a 3 button mouse.

Thank you,

Roy O'Neill
 
Old 07-07-2006, 07:07 PM   #5
pete1234
Member
 
Registered: May 2005
Distribution: Slack, FreeBSD,NetBSD, OpenBSD, Open Solaris, Minix
Posts: 172

Rep: Reputation: 30
You can emulate a third button by clicking both buttons simultaneously.
 
Old 07-07-2006, 07:29 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
You don't need one, and you're welcome. X lets you emulate a middle-
button by clicking BOTH buttons at the same time.


Cheers,
Tink
 
Old 07-07-2006, 08:13 PM   #7
wilby
LQ Newbie
 
Registered: Feb 2006
Posts: 11

Rep: Reputation: 1
I think nadroj has the best solution. Also in case your interested Slackbook is a great source of basics. It's well put together and easy to read. If your interested you can find it here: http://www.slackbook.org
 
Old 07-07-2006, 08:36 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Originally Posted by wilby
I think nadroj has the best solution. Also in case your interested Slackbook is a great source of basics. It's well put together and easy to read. If your interested you can find it here: http://www.slackbook.org
You got my attention: how will redirection to a file get his
information into the browser easily?
Like in
a) redirect
b) open file in kwrite
c) highlight desired text
d) copy text
e) hope that kwrite and browser share the same clipboard?


Cheers,
Tink
 
Old 07-07-2006, 08:45 PM   #9
tgo
Member
 
Registered: Dec 2004
Posts: 125

Rep: Reputation: 15
you could easily make a perl script to send your cookie and hte post topic .. something like

dmesg | perl postit.pl "Help with device"

and have postit.pl do something like while(<STDIN>) { $message .= $_; } and then post the message ( hopefully the mods dont mind this as it could cause some flooding ).
 
Old 07-07-2006, 09:09 PM   #10
wilby
LQ Newbie
 
Registered: Feb 2006
Posts: 11

Rep: Reputation: 1
I wasn't trying be insulting Tinkster I simply meant that "the basics" are often the best solution.

I know it would be a two step solution to redirect and then copy and paste from an X editor but there's not much to learn from point and click and there's a lot of satisfaction in using the command line.

So it was simply a personal preference. I try to use command line as much as possible.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
File transfer program!! vishamr2000 Programming 11 04-27-2006 04:22 AM
Redirecting output to a command-line argument of another command madiyaan Linux - Newbie 1 02-19-2005 04:35 PM
C function to execute a program and return the output of the program ryan.n Programming 4 08-14-2004 10:11 PM
Viewing program messages when program isn't run from command line? Locura Linux - Software 1 09-27-2003 08:19 AM


All times are GMT -5. The time now is 12:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration