RE: How to pipe output from lspci command to a file

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Bart Garst
Date:  
To: plug-discuss
Subject: RE: How to pipe output from lspci command to a file
>
> My retyping skills being what they are, how can I pipe (I think
> that is the
> right word) the output from a command line command such as "lspci -v" to a
> file for cut and paste?
>
> George
>


I think what you're looking for is a redirect.
`lspci -v > filename`
This will redirect the output from "lspci -v" into the file "filename" where
you can copy & paste.

The above redirect will only redirect stdout (the normal output). Any error
messages will still be sent to stderr (the console). To redirect stderr you
would also use an ampersand.
`command &> filename`
This will capture all error messages and standard output in the file
"filename". I uses this all the time to capture error messages from a build
process. Ex: `make &> log`.

A pipe would be used to send the output from one command, to the input of
another.
`lspci -v | grep ...`
This will send the output from "lspci -v" to grep, where you can use a
regular expression to get the exact piece of the lspci output you're looking
for.

HTH,
Bart


---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss