How to grep a save command in order to save the complete output of hwinfo to a txt file?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

How to grep a save command in order to save the complete output of hwinfo to a txt file?

Stakanov Schufter
I have to put the complete hwinfo from the cli to a txt outputfile. I recall I
can do this somehow with grep, but all the web resources speak about long
scripts. Notwithstanding, I recall, a very simple command can do this. If
somebody is knowledgeable I would appreciate.

Seasonal greetings.



--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to grep a save command in order to save the complete output of hwinfo to a txt file?

Markus Koßmann-3
Am Samstag, 31. Dezember 2016, 10:01:16 schrieb stakanov:
> I have to put the complete hwinfo from the cli to a txt outputfile. I recall
> I can do this somehow with grep,
What's wrong with
# hwinfo > hwinfo.txt

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to grep a save command in order to save the complete output of hwinfo to a txt file?

Dave Howorth-3
In reply to this post by Stakanov Schufter
On Sat, 31 Dec 2016 10:01:16 +0100
stakanov <[hidden email]> wrote:

> I have to put the complete hwinfo from the cli to a txt outputfile.

hwinfo > outputfile

Or did you mean something more complicated?

> I
> recall I can do this somehow with grep, but all the web resources
> speak about long scripts. Notwithstanding, I recall, a very simple
> command can do this. If somebody is knowledgeable I would appreciate.
>
> Seasonal greetings.

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to grep a save command in order to save the complete output of hwinfo to a txt file?

Per Jessen
In reply to this post by Stakanov Schufter
stakanov wrote:

> I have to put the complete hwinfo from the cli to a txt outputfile. I
> recall I can do this somehow with grep, but all the web resources
> speak about long scripts. Notwithstanding, I recall, a very simple
> command can do this. If somebody is knowledgeable I would appreciate.

Is this what you're after:

hwinfo >txtfile




--
Per Jessen, Zürich (-1.6°C)
http://www.dns24.ch/ - your free DNS host, made in Switzerland.


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to grep a save command in order to save the complete output of hwinfo to a txt file?

Felix Miata-3
In reply to this post by Stakanov Schufter
stakanov composed on 2016-12-31 10:01 (UTC+0100):

> I have to put the complete hwinfo from the cli to a txt outputfile. I recall I
> can do this somehow with grep, but all the web resources speak about long
> scripts. Notwithstanding, I recall, a very simple command can do this. If
> somebody is knowledgeable I would appreciate.

Grep would be for capturing some portion(s) of standard output. To capture the
complete standard output of hwinfo to a file, use ordinary redirection:

        hwinfo > hwinfo-output-file.txt
--
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

  Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to grep a save command in order to save the complete output of hwinfo to a txt file? [solved]

Stakanov Schufter
In reply to this post by Stakanov Schufter
In data sabato 31 dicembre 2016 10:01:16, stakanov ha scritto:
> I have to put the complete hwinfo from the cli to a txt outputfile. I recall
> I can do this somehow with grep, but all the web resources speak about long
> scripts. Notwithstanding, I recall, a very simple command can do this. If
> somebody is knowledgeable I would appreciate.
>
> Seasonal greetings.

your command: sudo hwinfo >txtfile

Thank you to everybody who answered. Works like charm.



--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to grep a save command in order to save the complete output of hwinfo to a txt file?

Stakanov Schufter
In reply to this post by Felix Miata-3
In data sabato 31 dicembre 2016 04:28:13, Felix Miata ha scritto:

> stakanov composed on 2016-12-31 10:01 (UTC+0100):
> > I have to put the complete hwinfo from the cli to a txt outputfile. I
> > recall I can do this somehow with grep, but all the web resources speak
> > about long scripts. Notwithstanding, I recall, a very simple command can
> > do this. If somebody is knowledgeable I would appreciate.
>
> Grep would be for capturing some portion(s) of standard output. To capture
> the complete standard output of hwinfo to a file, use ordinary redirection:
>
> hwinfo > hwinfo-output-file.txt

Ah, thank you very much. Now finally that is clearer to me. Great.



--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to grep a save command in order to save the complete output of hwinfo to a txt file?

Wol's lists
On 31/12/16 09:39, stakanov wrote:

> In data sabato 31 dicembre 2016 04:28:13, Felix Miata ha scritto:
>> stakanov composed on 2016-12-31 10:01 (UTC+0100):
>>> I have to put the complete hwinfo from the cli to a txt outputfile. I
>>> recall I can do this somehow with grep, but all the web resources speak
>>> about long scripts. Notwithstanding, I recall, a very simple command can
>>> do this. If somebody is knowledgeable I would appreciate.
>>
>> Grep would be for capturing some portion(s) of standard output. To capture
>> the complete standard output of hwinfo to a file, use ordinary redirection:
>>
>> hwinfo > hwinfo-output-file.txt
>
> Ah, thank you very much. Now finally that is clearer to me. Great.
>
>
>
The other way of doing it which can be very useful - "man tee"

hwinfo | tee hwinfo.txt

That will display the output on the screen at the same time, rather than
just silently dumping it to file. Depends what you want which one you
choose ... :-)

(That's the trouble with linux - too many options :-)

Cheers,
Wol

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to grep a save command in order to save the complete output of hwinfo to a txt file?

Carlos E. R.-2
In reply to this post by Stakanov Schufter
On 2016-12-31 10:39, stakanov wrote:

> In data sabato 31 dicembre 2016 04:28:13, Felix Miata ha scritto:
>> stakanov composed on 2016-12-31 10:01 (UTC+0100):
>>> I have to put the complete hwinfo from the cli to a txt outputfile. I
>>> recall I can do this somehow with grep, but all the web resources speak
>>> about long scripts. Notwithstanding, I recall, a very simple command can
>>> do this. If somebody is knowledgeable I would appreciate.
>>
>> Grep would be for capturing some portion(s) of standard output. To capture
>> the complete standard output of hwinfo to a file, use ordinary redirection:
>>
>> hwinfo > hwinfo-output-file.txt
>
> Ah, thank you very much. Now finally that is clearer to me. Great.

In the case of hwinfo, read the manual ;-)


Telcontar:~ # hwinfo --help
Usage: hwinfo [OPTIONS]
Probe for hardware.
Options:
...
    --log FILE
        Write log info to FILE.
        Don't forget to also specify --<HARDWARE_ITEM> to trigger any
        device probing.


So:

hwinfo --all --log  hwinfoOutput.txt




--
Cheers / Saludos,

                Carlos E. R.
                (from 42.2 x86_64 "Malachite" at Telcontar)


signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to grep a save command in order to save the complete output of hwinfo to a txt file?

Rüdiger Meier
In reply to this post by Stakanov Schufter
On Saturday 31 December 2016, stakanov wrote:
> I have to put the complete hwinfo from the cli to a txt outputfile. I
> recall I can do this somehow with grep, but all the web resources
> speak about long scripts. Notwithstanding, I recall, a very simple
> command can do this. If somebody is knowledgeable I would appreciate.
>
> Seasonal greetings.


$ hwinfo > /tmp/hwinfo.txt

writes it to /tmp/hwinfo.txt


cu,
Rudi

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]