1

When I try to use curl command in my shell script I get the following error message: curl: (1) Protocol "http not supported or disabled in libcurl
When I use the curl command with the same http:// argument on my terminal, I get a response from the site. Am I missing something?

Thanks

Update

var4="localhost:8983/xxx?yyy";
var5="-F stream.url=nexus.cvs.ula.abc.html";
var6='"'$var4'" '$var5
curl $var6
3
  • Please provide the shell script that produces the error. Commented Mar 23, 2012 at 9:23
  • Please provide example of how you invoke curl in command line and inside script. Also I suggest to compare $PATH in both cases to ensure that you use same executable file. Commented Mar 23, 2012 at 9:26
  • var4="localhost:8983/xxx?yyy" var5="-F stream.url=nexus.cvs.ula.abc.html" var6='"'$var4'" '$var5 curl $var6 Commented Mar 23, 2012 at 9:27

1 Answer 1

9

The error message

curl: (1) Protocol "http not supported or disabled in libcurl

makes me think that the URL you're passing may be

"http://someserver/somelink"

instead of

http://someserver/somelink

and curl is thinking that " is part of the url.

EDIT:

Based on your update, I'd say it should be:

var4="http://localhost:8983/xxx?yyy";
var5="-F stream.url=nexus.cvs.ula.abc.html";
curl $var5 $var4
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.