How to read an output file in one command line? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Configuring Firefox to use a proxy from the command lineHow can I preview HTML documents from the command line?Output Directory Contents to Filewhat is the command to restart firefox from the command line?Error while using command line command to load firefox in lubuntu 14.04How to install certificates for command lineHow to make a line of directories with one command?Lauch Firefox Developer Edition using command-lineRun .sh file in one line commandCommand output to file with dynamic file name

Does the main washing effect of soap come from foam?

Random body shuffle every night—can we still function?

Is a copyright notice with a non-existent name be invalid?

Why does BitLocker not use RSA?

geoserver.catalog.FailedRequestError: Tried to make a GET request to http://localhost:8080/geoserver/workspaces.xml but got a 404 status code

Searching extreme points of polyhedron

draw a pulley system

How to resize main filesystem

Pointing to problems without suggesting solutions

Why can't fire hurt Daenerys but it did to Jon Snow in season 1?

My mentor says to set image to Fine instead of RAW — how is this different from JPG?

Cost function for LTI system identification

How do I say "this must not happen"?

Can stored/leased 737s be used to substitute for grounded MAXs?

Why do C and C++ allow the expression (int) + 4*5?

Can two people see the same photon?

How many time has Arya actually used Needle?

Weaponising the Grasp-at-a-Distance spell

Noise in Eigenvalues plot

Keep at all times, the minus sign above aligned with minus sign below

How to name indistinguishable henchmen in a screenplay?

Can I take recommendation from someone I met at a conference?

Why did Israel vote against lifting the American embargo on Cuba?

Was the pager message from Nick Fury to Captain Marvel unnecessary?



How to read an output file in one command line?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Configuring Firefox to use a proxy from the command lineHow can I preview HTML documents from the command line?Output Directory Contents to Filewhat is the command to restart firefox from the command line?Error while using command line command to load firefox in lubuntu 14.04How to install certificates for command lineHow to make a line of directories with one command?Lauch Firefox Developer Edition using command-lineRun .sh file in one line commandCommand output to file with dynamic file name



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








3















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.




















  • In zsh you could do firefox =(lshw -html). In bash I don't see a way without repeating the file name in some way.

    – Sebastian Stark
    12 hours ago












  • check this (the "data uri" answer) for a way how to do it in bash: unix.stackexchange.com/questions/24931/… Nice and ugly trick.

    – Sebastian Stark
    12 hours ago












  • 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
    12 hours ago












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

    – LeonidMew
    3 hours ago

















3















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.




















  • In zsh you could do firefox =(lshw -html). In bash I don't see a way without repeating the file name in some way.

    – Sebastian Stark
    12 hours ago












  • check this (the "data uri" answer) for a way how to do it in bash: unix.stackexchange.com/questions/24931/… Nice and ugly trick.

    – Sebastian Stark
    12 hours ago












  • 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
    12 hours ago












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

    – LeonidMew
    3 hours ago













3












3








3








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 4 mins ago









SurvivalMachine

1,4783920




1,4783920






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 13 hours ago









Mostafa EsmailMostafa Esmail

191




191




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.












  • In zsh you could do firefox =(lshw -html). In bash I don't see a way without repeating the file name in some way.

    – Sebastian Stark
    12 hours ago












  • check this (the "data uri" answer) for a way how to do it in bash: unix.stackexchange.com/questions/24931/… Nice and ugly trick.

    – Sebastian Stark
    12 hours ago












  • 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
    12 hours ago












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

    – LeonidMew
    3 hours ago

















  • In zsh you could do firefox =(lshw -html). In bash I don't see a way without repeating the file name in some way.

    – Sebastian Stark
    12 hours ago












  • check this (the "data uri" answer) for a way how to do it in bash: unix.stackexchange.com/questions/24931/… Nice and ugly trick.

    – Sebastian Stark
    12 hours ago












  • 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
    12 hours ago












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

    – LeonidMew
    3 hours ago
















In zsh you could do firefox =(lshw -html). In bash I don't see a way without repeating the file name in some way.

– Sebastian Stark
12 hours ago






In zsh you could do firefox =(lshw -html). In bash I don't see a way without repeating the file name in some way.

– Sebastian Stark
12 hours ago














check this (the "data uri" answer) for a way how to do it in bash: unix.stackexchange.com/questions/24931/… Nice and ugly trick.

– Sebastian Stark
12 hours ago






check this (the "data uri" answer) for a way how to do it in bash: unix.stackexchange.com/questions/24931/… Nice and ugly trick.

– Sebastian Stark
12 hours ago














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
12 hours ago






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
12 hours ago














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

– LeonidMew
3 hours ago





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

– LeonidMew
3 hours ago










1 Answer
1






active

oldest

votes


















3














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
    13 hours ago












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

    – Mostafa Esmail
    12 hours ago











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

    – Jules Lamur
    11 hours ago












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

    – Mostafa Esmail
    10 hours ago











  • $ echo <(lshw -html) produces "/dev/fd/63", wc -l <(lshw -html) /dev/null produces "471 /dev/fd/63 ...". So why does firefox <(lshw -html) produce "Firefox can’t find the file at /dev/fd/pipe"?

    – Ray Butterworth
    9 hours ago











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









3














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
    13 hours ago












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

    – Mostafa Esmail
    12 hours ago











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

    – Jules Lamur
    11 hours ago












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

    – Mostafa Esmail
    10 hours ago











  • $ echo <(lshw -html) produces "/dev/fd/63", wc -l <(lshw -html) /dev/null produces "471 /dev/fd/63 ...". So why does firefox <(lshw -html) produce "Firefox can’t find the file at /dev/fd/pipe"?

    – Ray Butterworth
    9 hours ago















3














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
    13 hours ago












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

    – Mostafa Esmail
    12 hours ago











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

    – Jules Lamur
    11 hours ago












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

    – Mostafa Esmail
    10 hours ago











  • $ echo <(lshw -html) produces "/dev/fd/63", wc -l <(lshw -html) /dev/null produces "471 /dev/fd/63 ...". So why does firefox <(lshw -html) produce "Firefox can’t find the file at /dev/fd/pipe"?

    – Ray Butterworth
    9 hours ago













3












3








3







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 2 hours ago

























answered 13 hours ago









LeonidMewLeonidMew

1,148624




1,148624












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

    – Mostafa Esmail
    13 hours ago












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

    – Mostafa Esmail
    12 hours ago











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

    – Jules Lamur
    11 hours ago












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

    – Mostafa Esmail
    10 hours ago











  • $ echo <(lshw -html) produces "/dev/fd/63", wc -l <(lshw -html) /dev/null produces "471 /dev/fd/63 ...". So why does firefox <(lshw -html) produce "Firefox can’t find the file at /dev/fd/pipe"?

    – Ray Butterworth
    9 hours ago

















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

    – Mostafa Esmail
    13 hours ago












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

    – Mostafa Esmail
    12 hours ago











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

    – Jules Lamur
    11 hours ago












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

    – Mostafa Esmail
    10 hours ago











  • $ echo <(lshw -html) produces "/dev/fd/63", wc -l <(lshw -html) /dev/null produces "471 /dev/fd/63 ...". So why does firefox <(lshw -html) produce "Firefox can’t find the file at /dev/fd/pipe"?

    – Ray Butterworth
    9 hours ago
















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

– Mostafa Esmail
13 hours ago






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

– Mostafa Esmail
13 hours ago














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

– Mostafa Esmail
12 hours ago





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

– Mostafa Esmail
12 hours ago













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

– Jules Lamur
11 hours ago






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

– Jules Lamur
11 hours ago














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

– Mostafa Esmail
10 hours ago





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

– Mostafa Esmail
10 hours ago













$ echo <(lshw -html) produces "/dev/fd/63", wc -l <(lshw -html) /dev/null produces "471 /dev/fd/63 ...". So why does firefox <(lshw -html) produce "Firefox can’t find the file at /dev/fd/pipe"?

– Ray Butterworth
9 hours ago





$ echo <(lshw -html) produces "/dev/fd/63", wc -l <(lshw -html) /dev/null produces "471 /dev/fd/63 ...". So why does firefox <(lshw -html) produce "Firefox can’t find the file at /dev/fd/pipe"?

– Ray Butterworth
9 hours ago










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

Are there any comparative studies done between Ashtavakra Gita and Buddhim?How is it wrong to believe that a self exists, or that it doesn't?Can you criticise or improve Ven. Bodhi's description of MahayanaWas the doctrine of 'Anatta', accepted as doctrine by modern Buddhism, actually taught by the Buddha?Relationship between Buddhism, Hinduism and Yoga?Comparison of Nirvana, Tao and Brahman/AtmaIs there a distinction between “ego identity” and “craving/hating”?Are there many differences between Taoism and Buddhism?Loss of “faith” in buddhismSimilarity between creation in Abrahamic religions and beginning of life in Earth mentioned Agganna Sutta?Are there studies about the difference between meditating in the morning versus in the evening?Can one follow Hinduism and Buddhism at the same time?Are there any prohibitions on participating in other religion's practices?Psychology of 'flow'

fallocate: fallocate failed: Text file busy in Ubuntu 17.04? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)defragmenting and increasing performance of old lubuntu system with swap partitionIssue with increasing the root partition from the swapthis /usr/bin/dpkg returned error || ubuntu-16.04, 64bitDefault 17.04 swap file locationHow to Resize Ubuntu 17.04 Zesty Swap file size?Ubuntu freezes from online formsMy Laptop is not starting after upgrade ubuntu 16.04 (Kernel 4.8.0-38 to 04.10.0-36)hcp: ERROR: FALLOCATE FAILED!Not sure my swap is being usedWine 3.0 asking for more virtual free swap

Where else does the Shulchan Aruch quote an authority by name?Parashat Metzora+HagadolPesach/PassoverShulchan Aruch UTF-8Anonymous glosses in the Shulchan AruchWhy is the Shulchan Aruch definitive?Siman 32, Kitzur Shulchan Aruch: UntranslatedLitvaks/Yeshivish and Shulchan AruchBuying a Shulchan AruchEnglish version of SHULCHAN ARUCHIs there any place where Shulchan Aruch rules with the Rosh against the Rif and Rambam?Are there practices where Sepharadim do not hold by Shulchan Aruch?5th part of the shulchan aruch