Question about wget -qO-
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
add a comment |
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
add a comment |
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
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
wget
asked May 17 '17 at 19:37
BedeBede
163
163
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
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.
add a comment |
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 -
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.
add a comment |
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered May 17 '17 at 19:46
KusalanandaKusalananda
132k17252414
132k17252414
add a comment |
add a comment |
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 -
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.
add a comment |
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 -
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.
add a comment |
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 -
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 -
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.
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.
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Jan 3 '18 at 22:33
Michael HoffmannMichael Hoffmann
1226
1226
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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