LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 11-17-2005, 02:09 PM   #1
interndan
Member
 
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 13.37
Posts: 238

Rep: Reputation: 17
trying to copy the output of /sbin/lspci to another window


I was attempting to add my computer to the HCL. When I got to the section that asks for the output of /sbin/lspci, I could not figure out how to cut the info out of my bash shell to paste into the form. I'm sure there is probably a simple way to do this but my search has turned up nothing. Perhaps my search string is improperly phrased?
 
Old 11-17-2005, 02:32 PM   #2
uopjohnson
Member
 
Registered: Jun 2004
Location: San Francisco
Distribution: Slackware, Ubuntu, RHEL, OS X
Posts: 159

Rep: Reputation: 30
If you select the text you want to copy with your mouse you can use the middle mouse button to copy it into another window.
Or you can do
Code:
/sbin/lspci >> out.txt
and then open out.txt in a program you are more familiar with. The >> means write the output of this command to a file.
 
Old 11-17-2005, 02:52 PM   #3
interndan
Member
 
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 13.37
Posts: 238

Original Poster
Rep: Reputation: 17
Thanks for the quick reply. I'll give that a shot.
 
Old 11-17-2005, 06:29 PM   #4
grautu
Member
 
Registered: Jul 2005
Posts: 139

Rep: Reputation: 15
Quote:
Originally posted by uopjohnson
you can do
Code:
/sbin/lspci >> out.txt
and then open out.txt in a program you are more familiar with. The >> means write the output of this command to a file.
Please excuse me for interferring!
1. Could you please let me know what's the difference between > and >> commands? Till now I only used the simple form >.
2. However, the command
Code:
/sbin/lspci > out.txt
always overwrites the out.txt file and removes all of its former content. Do you know how to append instead of removing contents?
Grateful thanks!
 
Old 11-17-2005, 06:35 PM   #5
chrisortiz
Member
 
Registered: Nov 2005
Distribution: Slackware, and of course the super delux uber knoppix universal live recovery cd
Posts: 429

Rep: Reputation: 30
i think > overwrites a file, while >> appends it.

meaning if you have a file with text it, > will erase it and >> will add to it at the bottom.
 
Old 11-17-2005, 06:44 PM   #6
dannyl
Member
 
Registered: Aug 2003
Location: Near Marion, Ill.
Distribution: Slackware 12.2, Kubuntu, Zenwalk
Posts: 102

Rep: Reputation: 15
I just tried both methods.

/sbin/lspci > out.txt will overwrite the existing file

/sbin/lspci >> out.txt appends to the file
 
Old 11-17-2005, 07:30 PM   #7
uopjohnson
Member
 
Registered: Jun 2004
Location: San Francisco
Distribution: Slackware, Ubuntu, RHEL, OS X
Posts: 159

Rep: Reputation: 30
Thats correct >> appends to the end of an existing file, or creates a new file if one does not exist. > will overwrite the old file.
There, I'm sure, are better references than this one, but here is a Good Link that I found googling for "stdout redirection tutorial" on google.com/linux
You can do some cool basic things using this kind of redirection so it is good to be familiar with it.

Last edited by uopjohnson; 11-17-2005 at 07:34 PM.
 
Old 11-18-2005, 12:19 AM   #8
IRIGHTI
Member
 
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121

Rep: Reputation: 15
Also, if you just did it in an xterm, you just highlight the text you want to put into the page. Then, select in the page and press your center mouse button (mouse wheel button). Of course, that only works if you have a center mouse button.
 
Old 11-18-2005, 12:24 AM   #9
uopjohnson
Member
 
Registered: Jun 2004
Location: San Francisco
Distribution: Slackware, Ubuntu, RHEL, OS X
Posts: 159

Rep: Reputation: 30
Quote:
Originally posted by IRIGHTI
Of course, that only works if you have a center mouse button.
Actually if you are lacking a center button you can press the left and right buttons simultaneously to get the same result. It requires that "Emulate 3 buttons" be turned on in the xorg.conf file, but that is the default I believe.
 
Old 11-18-2005, 05:24 AM   #10
grautu
Member
 
Registered: Jul 2005
Posts: 139

Rep: Reputation: 15
Both >> and uopjohnson's Good link are great stuffs!
Thanks a lot!
 
  


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
/sbin/lspci paste cas1123 Linux - Hardware 2 08-06-2005 05:54 PM
Interpreting the output of 'lspci' command. drminix Linux - Hardware 2 06-14-2005 04:20 AM
Need help analysing lspci output benjaminrtz Linux - Newbie 1 03-16-2005 04:54 PM
3com network card not listed by /sbin/lspci lixy Linux - Hardware 7 02-12-2005 02:11 PM
Changing the output of lspci GT_Onizuka Linux - General 2 04-30-2004 06:50 PM


All times are GMT -5. The time now is 06:12 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration