system('curl www.google.com') doesn't work

Hi, everyone. I ran into some trouble when I tried to ran this in matlab 'system('curl www.google.com')'. Matlab prompts: curl: (48) An unknown option was passed in to libcurl
ans =
48
I spent long time on trying to fix it. But nothing seem to work.
I am using Matlab 2014a on a Mac.
Thank you.

3 个评论

I have a Mac too, and running the above command system('curl www.google.com') (or system('curl www.google.ca')) works fine. What happens if you (outside of MATLAB) launch a Terminal window and type curl www.google.com? Do you see the same error?
I am having the same issue also. I can use system('curl -h'). But all other options such as system('curl www.google.com') fail with the same message:
curl: (48) An unknown option was passed in to libcurl

请先登录,再进行评论。

回答(2 个)

system("curl http://www.google.com")

3 个评论

Don't you mean single quotes?
yeah sorry, I meant it didn't work with single quote.
and double quote won't work either.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Startup and Shutdown 的更多信息

提问:

wei
2014-4-30

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by