Add --slurpfile
This commit is contained in:
1 parent
8a79f1d0a3
commit
1de56bc5df
2 files changed
+22
-10
No files matched your search
@@ -209,13 +209,18 @@ sections:
|
||||
predefined variable. If you run jq with `--argjson foo 123`, then
|
||||
`$foo` is available in the program and has the value `123`.
|
||||
|
||||
* `--argfile name filename`:
|
||||
* `--slurpfile variable-name filename`:
|
||||
|
||||
This option passes the first value from the named file as a
|
||||
value to the jq program as a predefined variable. If you run jq
|
||||
with `--argfile foo bar`, then `$foo` is available in the
|
||||
program and has the value resulting from parsing the content of
|
||||
the file named `bar`.
|
||||
This option reads all the JSON texts in the named file and binds
|
||||
an array of the parsed JSON values to the given global variable.
|
||||
If you run jq with `--argfile foo bar`, then `$foo` is available
|
||||
in the program and has an array whose elements correspond to the
|
||||
texts in the file named `bar`.
|
||||
|
||||
* `--argfile variable-name filename`:
|
||||
|
||||
Like `--slurpfile`, but uses just the first value in the given
|
||||
file.
|
||||
|
||||
- title: Basic filters
|
||||
entries:
|
||||
|
||||
Reference in new issue
Block a user