Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

Is there a way in curl to use sequences but not give it a maximum value? So that it will download everything from the start of the sequence up?

For example:

curl ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.[548-*]

or something like that?

share|improve this question
In Unix/Linux, the shell expands globs (like your [548-*] before the command even gets to see it. To be on the safe side, wrap the URL in single quotes. At least my curl manual gives no such option, you could try [548-] (no end) or [548-1000], if it goes only to 563 it should complain it couldn't get 564 to 1000 (but get you the ones you are interested in). – vonbrand Mar 7 '13 at 20:04

Curl doesn't have an option to tell it to stop on the first error. (-f doesn't do that: curl still proceeds with the next URL on the command line.)

So let the shell handle the logic. Call curl once per URL. Stop at the first error.

  curl ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.$n
share|improve this answer

Use curve expansion?

curl ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.{548..1000}

share|improve this answer

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.