Question about wget -qO-












2















In the string



wget -qO-



What exactly am I doing? I've never seen a switch that has a dash after the expression.



But, to install Docker, I am using wget -qO- https://get.docker.com | sh










share|improve this question



























    2















    In the string



    wget -qO-



    What exactly am I doing? I've never seen a switch that has a dash after the expression.



    But, to install Docker, I am using wget -qO- https://get.docker.com | sh










    share|improve this question

























      2












      2








      2








      In the string



      wget -qO-



      What exactly am I doing? I've never seen a switch that has a dash after the expression.



      But, to install Docker, I am using wget -qO- https://get.docker.com | sh










      share|improve this question














      In the string



      wget -qO-



      What exactly am I doing? I've never seen a switch that has a dash after the expression.



      But, to install Docker, I am using wget -qO- https://get.docker.com | sh







      wget






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 17 '17 at 19:37









      BedeBede

      163




      163






















          3 Answers
          3






          active

          oldest

          votes


















          8














          There is nothing wrong or strange about this.



          -qO- is the same as -q (quiet) followed by -O - (output to standard output).



          See the wget manual.



          The fact that the options are squished together is common Unix practice, and an option that takes an option-argument doesn't usually need a space in-between.



          The fact that you're pulling something from the web and feeding it directly into sh should be more of a concern for you.






          share|improve this answer































            1














            The following wget and curl commands have the same effect



            wget -q -O - https://download.docker.com/linux/ubuntu/gpg

            curl -fsSL https://download.docker.com/linux/ubuntu/gpg


            You can run it in a Linux terminal to see the result. Basically it's output to system standout stream.



            One of the practical examples of these commands are followed by | apt-key add - to add apt-key.



            For example,



            curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -





            share|improve this answer








            New contributor




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




























              0














              This is equivalent to



              wget -q -O -


              From man wget, here's what each option means:



              -q
              --quiet
              Turn of Wget's output.

              -O file
              --output-document=file
              The documents will not be written to the appropriate files, but all will be concatenated together and written to file.


              Continuing the description for -O, we see that the mysterious - is just a special symbol used by the -O option to mean standard output:



              If ‘-’ is used as file, documents will be printed to standard output, disabling link conversion.





              share|improve this answer























                Your Answer








                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "106"
                };
                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: false,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                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
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f365698%2fquestion-about-wget-qo%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                8














                There is nothing wrong or strange about this.



                -qO- is the same as -q (quiet) followed by -O - (output to standard output).



                See the wget manual.



                The fact that the options are squished together is common Unix practice, and an option that takes an option-argument doesn't usually need a space in-between.



                The fact that you're pulling something from the web and feeding it directly into sh should be more of a concern for you.






                share|improve this answer




























                  8














                  There is nothing wrong or strange about this.



                  -qO- is the same as -q (quiet) followed by -O - (output to standard output).



                  See the wget manual.



                  The fact that the options are squished together is common Unix practice, and an option that takes an option-argument doesn't usually need a space in-between.



                  The fact that you're pulling something from the web and feeding it directly into sh should be more of a concern for you.






                  share|improve this answer


























                    8












                    8








                    8







                    There is nothing wrong or strange about this.



                    -qO- is the same as -q (quiet) followed by -O - (output to standard output).



                    See the wget manual.



                    The fact that the options are squished together is common Unix practice, and an option that takes an option-argument doesn't usually need a space in-between.



                    The fact that you're pulling something from the web and feeding it directly into sh should be more of a concern for you.






                    share|improve this answer













                    There is nothing wrong or strange about this.



                    -qO- is the same as -q (quiet) followed by -O - (output to standard output).



                    See the wget manual.



                    The fact that the options are squished together is common Unix practice, and an option that takes an option-argument doesn't usually need a space in-between.



                    The fact that you're pulling something from the web and feeding it directly into sh should be more of a concern for you.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered May 17 '17 at 19:46









                    KusalanandaKusalananda

                    132k17252414




                    132k17252414

























                        1














                        The following wget and curl commands have the same effect



                        wget -q -O - https://download.docker.com/linux/ubuntu/gpg

                        curl -fsSL https://download.docker.com/linux/ubuntu/gpg


                        You can run it in a Linux terminal to see the result. Basically it's output to system standout stream.



                        One of the practical examples of these commands are followed by | apt-key add - to add apt-key.



                        For example,



                        curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -





                        share|improve this answer








                        New contributor




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

























                          1














                          The following wget and curl commands have the same effect



                          wget -q -O - https://download.docker.com/linux/ubuntu/gpg

                          curl -fsSL https://download.docker.com/linux/ubuntu/gpg


                          You can run it in a Linux terminal to see the result. Basically it's output to system standout stream.



                          One of the practical examples of these commands are followed by | apt-key add - to add apt-key.



                          For example,



                          curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -





                          share|improve this answer








                          New contributor




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























                            1












                            1








                            1







                            The following wget and curl commands have the same effect



                            wget -q -O - https://download.docker.com/linux/ubuntu/gpg

                            curl -fsSL https://download.docker.com/linux/ubuntu/gpg


                            You can run it in a Linux terminal to see the result. Basically it's output to system standout stream.



                            One of the practical examples of these commands are followed by | apt-key add - to add apt-key.



                            For example,



                            curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -





                            share|improve this answer








                            New contributor




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










                            The following wget and curl commands have the same effect



                            wget -q -O - https://download.docker.com/linux/ubuntu/gpg

                            curl -fsSL https://download.docker.com/linux/ubuntu/gpg


                            You can run it in a Linux terminal to see the result. Basically it's output to system standout stream.



                            One of the practical examples of these commands are followed by | apt-key add - to add apt-key.



                            For example,



                            curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -






                            share|improve this answer








                            New contributor




                            Michael Qin 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 answer



                            share|improve this answer






                            New contributor




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









                            answered 2 hours ago









                            Michael QinMichael Qin

                            112




                            112




                            New contributor




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





                            New contributor





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






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























                                0














                                This is equivalent to



                                wget -q -O -


                                From man wget, here's what each option means:



                                -q
                                --quiet
                                Turn of Wget's output.

                                -O file
                                --output-document=file
                                The documents will not be written to the appropriate files, but all will be concatenated together and written to file.


                                Continuing the description for -O, we see that the mysterious - is just a special symbol used by the -O option to mean standard output:



                                If ‘-’ is used as file, documents will be printed to standard output, disabling link conversion.





                                share|improve this answer




























                                  0














                                  This is equivalent to



                                  wget -q -O -


                                  From man wget, here's what each option means:



                                  -q
                                  --quiet
                                  Turn of Wget's output.

                                  -O file
                                  --output-document=file
                                  The documents will not be written to the appropriate files, but all will be concatenated together and written to file.


                                  Continuing the description for -O, we see that the mysterious - is just a special symbol used by the -O option to mean standard output:



                                  If ‘-’ is used as file, documents will be printed to standard output, disabling link conversion.





                                  share|improve this answer


























                                    0












                                    0








                                    0







                                    This is equivalent to



                                    wget -q -O -


                                    From man wget, here's what each option means:



                                    -q
                                    --quiet
                                    Turn of Wget's output.

                                    -O file
                                    --output-document=file
                                    The documents will not be written to the appropriate files, but all will be concatenated together and written to file.


                                    Continuing the description for -O, we see that the mysterious - is just a special symbol used by the -O option to mean standard output:



                                    If ‘-’ is used as file, documents will be printed to standard output, disabling link conversion.





                                    share|improve this answer













                                    This is equivalent to



                                    wget -q -O -


                                    From man wget, here's what each option means:



                                    -q
                                    --quiet
                                    Turn of Wget's output.

                                    -O file
                                    --output-document=file
                                    The documents will not be written to the appropriate files, but all will be concatenated together and written to file.


                                    Continuing the description for -O, we see that the mysterious - is just a special symbol used by the -O option to mean standard output:



                                    If ‘-’ is used as file, documents will be printed to standard output, disabling link conversion.






                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Jan 3 '18 at 22:33









                                    Michael HoffmannMichael Hoffmann

                                    1226




                                    1226






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                        • 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%2funix.stackexchange.com%2fquestions%2f365698%2fquestion-about-wget-qo%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

                                        Histoire des bourses de valeurs

                                        Rename multiple files to decrement number in file name?

                                        Python if-else code style for reduced code for rounding floats