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.
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.
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.
1No,
-O
doesn't do the same here... the closest equivalent would be-o
, but since it's for piping (the OP wanted awget -O -
equivalent), no option at all is needed. – user1686 – 2015-08-19T05:10:27.557Whoops, 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