1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

Add a --arg option to allow variables to be passed from the cmdline.

Closes #107
This commit is contained in:
Stephen Dolan
2013-05-06 14:21:00 +01:00
parent 48be23233a
commit 5be97463ec
7 changed files with 46 additions and 6 deletions

View File

@@ -121,6 +121,12 @@ sections:
formatted as a JSON string with quotes. This can be useful for
making jq filters talk to non-JSON-based systems.
* `--arg name value`:
This option passes a value to the jq program as a predefined
variable. If you run jq with `--arg foo bar`, then `$foo` is
available in the program and has the value `"bar"`.
- title: Basic filters
entries:
- title: "`.`"