Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to download file using curl, but I get the following error message.

-o: command not found

My command was

curl -o 'saveas.smi'

Do I have error with my command?

share|improve this question

migrated from Oct 20 '10 at 10:17

This question came from our site for professional and enthusiast programmers.

question does not belong here – N 1.1 Oct 20 '10 at 7:08
Retagged your question since your issue is with how bash escapes special characters, not with curl. – Prof. Falken Oct 20 '10 at 7:09
@N, no, but kind of a little. Bash is after all a programming language, too. – Prof. Falken Oct 20 '10 at 7:10
@N 1.1 // Sorry. I think it belongs to – user45326 Oct 20 '10 at 7:21
Or maybe It is more of a server admin thing to muck around with scripts, right? – Prof. Falken Oct 20 '10 at 7:27

Your command looks OK, but you also need to quote the URL, like so:

curl '' -o 'saveas.smi'
share|improve this answer
Oh yes, with all those & characters it is wise to quote the URL. – eumiro Oct 20 '10 at 7:14
What it did here was separating several commands: curl, bbs_no=236513, etc. all of them are valid (variable assignments in bash)… except the last -o which follows a variable assignement and therefore is an other command – Benoit Oct 20 '10 at 7:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.