Sunday, April 28, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 9782  / 1 Year ago, sun, november 20, 2022, 7:46:07

I see some linux page says how to install the key:



  wget http://packages.ros.org/ros.key -O - | sudo apt-key add -


What is "-O -" in wget?



It seems related with "add -".



How these works?



Thank you~


More From » command-line

 Answers
2

The option -O - prints the downloaded file to standard output (instead of a ordinary file) and the - option in apt-key reads from standard input. The command is equivalent to the two commands:



wget http://packages.ros.org/ros.key
sudo apt-key add ros.key


When you chain both commands you don't have to bother with saving a file and usually the command is shorter.


[#33270] Sunday, November 20, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
otputler

Total Points: 53
Total Questions: 105
Total Answers: 93

Location: Zimbabwe
Member since Wed, Nov 9, 2022
2 Years ago
otputler questions
Tue, Aug 23, 22, 14:36, 2 Years ago
Fri, Jul 23, 21, 11:57, 3 Years ago
Sun, Feb 12, 23, 18:37, 1 Year ago
;