0

In this command:

wget -qO- https://get.speedify.com | bash -

Source: https://support.speedify.com/article/562-install-speedify-linux

...the first -q is the option for "quiet" mode. What is the O- (notice that is the letter "O", NOT a zero) part though? Why the letter O? Why the trailing -? Finally, after the bash command there is also a trailing -. Why?

Update: now that I know that is the letter O, NOT a zero, I see this from the man wget manual pages:

  -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.  If - is used as file, documents will be
      printed to standard output, disabling link conversion.

So, -qO is the same as -q -O, and -O sets the output file, and -O- apparently says to print the document to standard output. I wonder why they didn't do -O=- or -O - though...?

Not a duplicate:

This question answers the smallest, least-relevant, and least-significant part of my question: Do command line options take an equals sign between option name and value?. It does not answer my question.

  • is stadin/stdout Here is a deeper answer. https://unix.stackexchange.com/questions/16357/usage-of-dash-in-place-of-a-filename
  • – threeiem Sep 14 '21 at 22:56
  • I actually wondered why that commands lacks a sudo before bash (without sudo, you can't be sure you achieve the maximum of damage possible when blindly running commands off the internet). But no problem, it's all there on the linked page ;-) –  Sep 16 '21 at 21:16