upvote
That's the shell expansion, not curl. Works with everything.

  $ mv file.{foo,bak}
reply
Yeah I know. But shell just passes multiple URLs as arguments to curl. I didn’t know curl would accept that. In your example if there were more expansions it is up to mv to require the last one to be a directory. And many others just don’t accept multiple arguments.
reply
It does but you have to use '[1..14]'. {1..14} is a shell expansion.
reply
curl accepts multiple URL args
reply
It does. And {1..14} would be a shell expansion not a curl feature ie the shell blew it up to 14 different args before curl saw it.
reply
Your initial comment stated that to support multiple URLs it is required to use [] syntax. This is inaccurate, because curl supports multiple URL args hence shell expansion {} works just fine.
reply
Why are we nitpicking shell syntax in a page on a monumental result like this? He was thinking its a curl feature. I was just clarifying its a shell feature, I try not to depend on shell expansions due to the command buffer limits so something like a for loop or curls internal expansion is good to know of.

edit: apparently he clarified later he meant he really didn't know of curl a b c d etc working.

reply