What is the curl equivalent of wget -qO (wget -q -O)?

1

1

I need to run the following command in Red Hat Linux:

wget -q -O http://somepage/somefile.cgi | bash

But I don't have wget installed. I could install it, but I want to know how to do this with curl.

Daniel

Posted 2015-08-19T02:30:38.927

Reputation: 219

Answers

0

This should do it.

curl -s http://somepage/somefile.cgi | sh

EDIT: removed -O: Not needed as it's piping to the bash, as @gravity's comment mentions.

HighVoltage

Posted 2015-08-19T02:30:38.927

Reputation: 136

1No, -O doesn't do the same here... the closest equivalent would be -o, but since it's for piping (the OP wanted a wget -O - equivalent), no option at all is needed. – user1686 – 2015-08-19T05:10:27.557

Whoops, sorry, you are right. I mixed up saving as a file and piping to bash. – HighVoltage – 2015-08-19T18:57:30.990

Thanks for the help. I never saw your edit and your original answer didn't work. I ended up installing wget :p – Daniel – 2015-08-20T03:53:49.407