How to read an output file in one command line?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







2















How to do something like this correctly?



$: lshw -html > /tmp/specs.html < firefox


also tried



$: firefox < "lshw -html > /tmp/specs.html"









share|improve this question









New contributor




Mostafa Esmail is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • thanks , it worked . But the html appeared like as a source like this ?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="w3.org/1999/xhtml"> <head> <meta name="generator" content="lshw-B.02.18" /> <style type="text/css"> .first {font-weight: bold; margin-left: none; padding-right: 1em;vertical-align: top; } .......

    – Mostafa Esmail
    Apr 21 at 22:05













  • @SebastianStark data uri not working anymore, get blocking from top level navigation, due security bug

    – LeonidMew
    Apr 22 at 7:04


















2















How to do something like this correctly?



$: lshw -html > /tmp/specs.html < firefox


also tried



$: firefox < "lshw -html > /tmp/specs.html"









share|improve this question









New contributor




Mostafa Esmail is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • thanks , it worked . But the html appeared like as a source like this ?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="w3.org/1999/xhtml"> <head> <meta name="generator" content="lshw-B.02.18" /> <style type="text/css"> .first {font-weight: bold; margin-left: none; padding-right: 1em;vertical-align: top; } .......

    – Mostafa Esmail
    Apr 21 at 22:05













  • @SebastianStark data uri not working anymore, get blocking from top level navigation, due security bug

    – LeonidMew
    Apr 22 at 7:04














2












2








2








How to do something like this correctly?



$: lshw -html > /tmp/specs.html < firefox


also tried



$: firefox < "lshw -html > /tmp/specs.html"









share|improve this question









New contributor




Mostafa Esmail is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












How to do something like this correctly?



$: lshw -html > /tmp/specs.html < firefox


also tried



$: firefox < "lshw -html > /tmp/specs.html"






command-line firefox






share|improve this question









New contributor




Mostafa Esmail is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Mostafa Esmail is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Apr 22 at 10:18









SurvivalMachine

1,4803920




1,4803920






New contributor




Mostafa Esmail is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Apr 21 at 20:55









Mostafa EsmailMostafa Esmail

142




142




New contributor




Mostafa Esmail is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Mostafa Esmail is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Mostafa Esmail is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • thanks , it worked . But the html appeared like as a source like this ?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="w3.org/1999/xhtml"> <head> <meta name="generator" content="lshw-B.02.18" /> <style type="text/css"> .first {font-weight: bold; margin-left: none; padding-right: 1em;vertical-align: top; } .......

    – Mostafa Esmail
    Apr 21 at 22:05













  • @SebastianStark data uri not working anymore, get blocking from top level navigation, due security bug

    – LeonidMew
    Apr 22 at 7:04



















  • thanks , it worked . But the html appeared like as a source like this ?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="w3.org/1999/xhtml"> <head> <meta name="generator" content="lshw-B.02.18" /> <style type="text/css"> .first {font-weight: bold; margin-left: none; padding-right: 1em;vertical-align: top; } .......

    – Mostafa Esmail
    Apr 21 at 22:05













  • @SebastianStark data uri not working anymore, get blocking from top level navigation, due security bug

    – LeonidMew
    Apr 22 at 7:04

















thanks , it worked . But the html appeared like as a source like this ?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="w3.org/1999/xhtml"> <head> <meta name="generator" content="lshw-B.02.18" /> <style type="text/css"> .first {font-weight: bold; margin-left: none; padding-right: 1em;vertical-align: top; } .......

– Mostafa Esmail
Apr 21 at 22:05







thanks , it worked . But the html appeared like as a source like this ?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="w3.org/1999/xhtml"> <head> <meta name="generator" content="lshw-B.02.18" /> <style type="text/css"> .first {font-weight: bold; margin-left: none; padding-right: 1em;vertical-align: top; } .......

– Mostafa Esmail
Apr 21 at 22:05















@SebastianStark data uri not working anymore, get blocking from top level navigation, due security bug

– LeonidMew
Apr 22 at 7:04





@SebastianStark data uri not working anymore, get blocking from top level navigation, due security bug

– LeonidMew
Apr 22 at 7:04










1 Answer
1






active

oldest

votes


















6














You should output lshw to a file, and open that file with firefox, as follows:



lshw -html >/tmp/specs.html && firefox /tmp/specs.html


Or



sudo lshw -html >/tmp/specs.html && firefox /tmp/specs.html


Update: Following not uses temp files, but need bcat

Install bcat package:



sudo apt install ruby-bcat


Then the command you want is simple



lshw -html|bcat -b firefox


bcat help output:




Pipe to browser utility. Read standard input, possibly one or more
s, and write concatenated / formatted output to browser.







share|improve this answer


























  • thanks for the answer , but I don't want to write the filename again

    – Mostafa Esmail
    Apr 21 at 21:16













  • I mean , I want to use the output file "specs.html" as an input for the command firefox

    – Mostafa Esmail
    Apr 21 at 21:26











  • Would using a variable solve your issue? e.g. FILE="/tmp/specs.html"; lshw -html > $FILE && firefox $FILE.

    – Jules Lamur
    Apr 21 at 22:34













  • thanks , but this is the same ,, you wrote $FILE twice

    – Mostafa Esmail
    Apr 21 at 23:28






  • 1





    @MostafaEsmail Updated answer. With bcat you don't need to write to file at all

    – LeonidMew
    Apr 22 at 7:16












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Mostafa Esmail is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1135887%2fhow-to-read-an-output-file-in-one-command-line%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









6














You should output lshw to a file, and open that file with firefox, as follows:



lshw -html >/tmp/specs.html && firefox /tmp/specs.html


Or



sudo lshw -html >/tmp/specs.html && firefox /tmp/specs.html


Update: Following not uses temp files, but need bcat

Install bcat package:



sudo apt install ruby-bcat


Then the command you want is simple



lshw -html|bcat -b firefox


bcat help output:




Pipe to browser utility. Read standard input, possibly one or more
s, and write concatenated / formatted output to browser.







share|improve this answer


























  • thanks for the answer , but I don't want to write the filename again

    – Mostafa Esmail
    Apr 21 at 21:16













  • I mean , I want to use the output file "specs.html" as an input for the command firefox

    – Mostafa Esmail
    Apr 21 at 21:26











  • Would using a variable solve your issue? e.g. FILE="/tmp/specs.html"; lshw -html > $FILE && firefox $FILE.

    – Jules Lamur
    Apr 21 at 22:34













  • thanks , but this is the same ,, you wrote $FILE twice

    – Mostafa Esmail
    Apr 21 at 23:28






  • 1





    @MostafaEsmail Updated answer. With bcat you don't need to write to file at all

    – LeonidMew
    Apr 22 at 7:16
















6














You should output lshw to a file, and open that file with firefox, as follows:



lshw -html >/tmp/specs.html && firefox /tmp/specs.html


Or



sudo lshw -html >/tmp/specs.html && firefox /tmp/specs.html


Update: Following not uses temp files, but need bcat

Install bcat package:



sudo apt install ruby-bcat


Then the command you want is simple



lshw -html|bcat -b firefox


bcat help output:




Pipe to browser utility. Read standard input, possibly one or more
s, and write concatenated / formatted output to browser.







share|improve this answer


























  • thanks for the answer , but I don't want to write the filename again

    – Mostafa Esmail
    Apr 21 at 21:16













  • I mean , I want to use the output file "specs.html" as an input for the command firefox

    – Mostafa Esmail
    Apr 21 at 21:26











  • Would using a variable solve your issue? e.g. FILE="/tmp/specs.html"; lshw -html > $FILE && firefox $FILE.

    – Jules Lamur
    Apr 21 at 22:34













  • thanks , but this is the same ,, you wrote $FILE twice

    – Mostafa Esmail
    Apr 21 at 23:28






  • 1





    @MostafaEsmail Updated answer. With bcat you don't need to write to file at all

    – LeonidMew
    Apr 22 at 7:16














6












6








6







You should output lshw to a file, and open that file with firefox, as follows:



lshw -html >/tmp/specs.html && firefox /tmp/specs.html


Or



sudo lshw -html >/tmp/specs.html && firefox /tmp/specs.html


Update: Following not uses temp files, but need bcat

Install bcat package:



sudo apt install ruby-bcat


Then the command you want is simple



lshw -html|bcat -b firefox


bcat help output:




Pipe to browser utility. Read standard input, possibly one or more
s, and write concatenated / formatted output to browser.







share|improve this answer















You should output lshw to a file, and open that file with firefox, as follows:



lshw -html >/tmp/specs.html && firefox /tmp/specs.html


Or



sudo lshw -html >/tmp/specs.html && firefox /tmp/specs.html


Update: Following not uses temp files, but need bcat

Install bcat package:



sudo apt install ruby-bcat


Then the command you want is simple



lshw -html|bcat -b firefox


bcat help output:




Pipe to browser utility. Read standard input, possibly one or more
s, and write concatenated / formatted output to browser.








share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 22 at 8:07

























answered Apr 21 at 21:03









LeonidMewLeonidMew

1,320624




1,320624













  • thanks for the answer , but I don't want to write the filename again

    – Mostafa Esmail
    Apr 21 at 21:16













  • I mean , I want to use the output file "specs.html" as an input for the command firefox

    – Mostafa Esmail
    Apr 21 at 21:26











  • Would using a variable solve your issue? e.g. FILE="/tmp/specs.html"; lshw -html > $FILE && firefox $FILE.

    – Jules Lamur
    Apr 21 at 22:34













  • thanks , but this is the same ,, you wrote $FILE twice

    – Mostafa Esmail
    Apr 21 at 23:28






  • 1





    @MostafaEsmail Updated answer. With bcat you don't need to write to file at all

    – LeonidMew
    Apr 22 at 7:16



















  • thanks for the answer , but I don't want to write the filename again

    – Mostafa Esmail
    Apr 21 at 21:16













  • I mean , I want to use the output file "specs.html" as an input for the command firefox

    – Mostafa Esmail
    Apr 21 at 21:26











  • Would using a variable solve your issue? e.g. FILE="/tmp/specs.html"; lshw -html > $FILE && firefox $FILE.

    – Jules Lamur
    Apr 21 at 22:34













  • thanks , but this is the same ,, you wrote $FILE twice

    – Mostafa Esmail
    Apr 21 at 23:28






  • 1





    @MostafaEsmail Updated answer. With bcat you don't need to write to file at all

    – LeonidMew
    Apr 22 at 7:16

















thanks for the answer , but I don't want to write the filename again

– Mostafa Esmail
Apr 21 at 21:16







thanks for the answer , but I don't want to write the filename again

– Mostafa Esmail
Apr 21 at 21:16















I mean , I want to use the output file "specs.html" as an input for the command firefox

– Mostafa Esmail
Apr 21 at 21:26





I mean , I want to use the output file "specs.html" as an input for the command firefox

– Mostafa Esmail
Apr 21 at 21:26













Would using a variable solve your issue? e.g. FILE="/tmp/specs.html"; lshw -html > $FILE && firefox $FILE.

– Jules Lamur
Apr 21 at 22:34







Would using a variable solve your issue? e.g. FILE="/tmp/specs.html"; lshw -html > $FILE && firefox $FILE.

– Jules Lamur
Apr 21 at 22:34















thanks , but this is the same ,, you wrote $FILE twice

– Mostafa Esmail
Apr 21 at 23:28





thanks , but this is the same ,, you wrote $FILE twice

– Mostafa Esmail
Apr 21 at 23:28




1




1





@MostafaEsmail Updated answer. With bcat you don't need to write to file at all

– LeonidMew
Apr 22 at 7:16





@MostafaEsmail Updated answer. With bcat you don't need to write to file at all

– LeonidMew
Apr 22 at 7:16










Mostafa Esmail is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Mostafa Esmail is a new contributor. Be nice, and check out our Code of Conduct.













Mostafa Esmail is a new contributor. Be nice, and check out our Code of Conduct.












Mostafa Esmail is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1135887%2fhow-to-read-an-output-file-in-one-command-line%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Plaza Victoria

Brian Clough

Cáceres