Skip to content

Commit

Permalink
variables.md: document the byte range coming in 8.12.0
Browse files Browse the repository at this point in the history
Closes #520
  • Loading branch information
bagder committed Dec 21, 2024
1 parent ea2d870 commit 0cd29e0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmdline/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ You can assign the contents of a plain text file to a variable, too:

curl --variable varName@filename

Starting in curl 8.12.0, you can get a byte range from a given file by
appending `;[N-M]` to the file name, where `N` and `M` are numerical byte
offsets into the file where the second number can be omitted to mean until end
of file. For example, get the contents from a file from byte offset 100 to and
including byte offset 200:

curl --variable "varName@filename;[100-200]"

## Expand

Variables can be expanded in option parameters using `{{varName}}` when the
Expand Down

0 comments on commit 0cd29e0

Please sign in to comment.