LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 01:09 PM   #1
interndan
Member
 
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 15 64bit on Desktop Slackwarearm on Raspberry PI v1b
Posts: 381

Rep: Reputation: 38
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, 01: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, 01:52 PM   #3
interndan
Member
 
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 15 64bit on Desktop Slackwarearm on Raspberry PI v1b
Posts: 381

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

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, 05: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, 05: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, 06: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 06:34 PM.
 
Old 11-17-2005, 11:19 PM   #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-17-2005, 11:24 PM   #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, 04:24 AM   #10
grautu
Member
 
Registered: Jul 2005
Posts: 142

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


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:28 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
Open Source Consulting | Domain Registration